Lines Matching refs:panic
32 // Swap in a null panic hook to avoid printing "thread panicked" to stderr,
35 // of the proc_macro crate's APIs currently panic.
48 // There is still a race condition where a panic in a different thread can
49 // happen during the interval that the user's original panic hook is
51 // sufficiently unlikely and less bad than printing panic messages to stderr
58 use std::panic::{self, PanicInfo};
64 let original_hook = panic::take_hook();
65 panic::set_hook(null_hook);
67 let works = panic::catch_unwind(proc_macro::Span::call_site).is_ok();
70 let hopefully_null_hook = panic::take_hook();
71 panic::set_hook(original_hook);
73 panic!("observed race condition in proc_macro2::inside_proc_macro");