1- #![ feature( rustc_private, once_cell ) ]
1+ #![ feature( rustc_private) ]
22#![ warn( rust_2018_idioms) ]
33#![ warn( unused_lifetimes) ]
44#![ warn( unreachable_pub) ]
@@ -9,7 +9,6 @@ extern crate rustc_interface;
99extern crate rustc_session;
1010extern crate rustc_target;
1111
12- use std:: lazy:: SyncLazy ;
1312use std:: panic;
1413
1514use rustc_data_structures:: profiling:: { get_resident_set_size, print_time_passes_entry} ;
@@ -18,10 +17,13 @@ use rustc_session::config::ErrorOutputType;
1817use rustc_session:: early_error;
1918use rustc_target:: spec:: PanicStrategy ;
2019
20+ // FIXME use std::lazy::SyncLazy once it stabilizes
21+ use once_cell:: sync:: Lazy ;
22+
2123const BUG_REPORT_URL : & str = "https://github.com/bjorn3/rustc_codegen_cranelift/issues/new" ;
2224
23- static DEFAULT_HOOK : SyncLazy < Box < dyn Fn ( & panic:: PanicInfo < ' _ > ) + Sync + Send + ' static > > =
24- SyncLazy :: new ( || {
25+ static DEFAULT_HOOK : Lazy < Box < dyn Fn ( & panic:: PanicInfo < ' _ > ) + Sync + Send + ' static > > =
26+ Lazy :: new ( || {
2527 let hook = panic:: take_hook ( ) ;
2628 panic:: set_hook ( Box :: new ( |info| {
2729 // Invoke the default handler, which prints the actual panic message and optionally a backtrace
@@ -61,7 +63,7 @@ fn main() {
6163 let start_rss = get_resident_set_size ( ) ;
6264 rustc_driver:: init_rustc_env_logger ( ) ;
6365 let mut callbacks = CraneliftPassesCallbacks :: default ( ) ;
64- SyncLazy :: force ( & DEFAULT_HOOK ) ; // Install ice hook
66+ Lazy :: force ( & DEFAULT_HOOK ) ; // Install ice hook
6567 let exit_code = rustc_driver:: catch_with_exit_code ( || {
6668 let args = std:: env:: args_os ( )
6769 . enumerate ( )
0 commit comments