Lines Matching full:panic
34 // Swap in a null panic hook to avoid printing "thread panicked" to stderr,
37 // of the proc_macro crate's APIs currently panic.
50 // There is still a race condition where a panic in a different thread can
51 // happen during the interval that the user's original panic hook is
53 // sufficiently unlikely and less bad than printing panic messages to stderr
60 use std::panic::{self, PanicInfo}; in initialize()
66 let original_hook = panic::take_hook(); in initialize()
67 panic::set_hook(null_hook); in initialize()
69 let works = panic::catch_unwind(proc_macro::Span::call_site).is_ok(); in initialize()
72 let hopefully_null_hook = panic::take_hook(); in initialize()
73 panic::set_hook(original_hook); in initialize()
75 panic!("observed race condition in proc_macro2::inside_proc_macro"); in initialize()