1+ use crate :: rustc_middle:: dep_graph:: DepContext ;
12use crate :: {
23 access_modifier:: AccessModifer ,
34 cil:: { CILOp , CallSite } ,
@@ -10,7 +11,6 @@ use crate::{
1011 r#type:: TypeDef ,
1112 IString ,
1213} ;
13- use crate :: rustc_middle:: dep_graph:: DepContext ;
1414use rustc_middle:: mir:: {
1515 interpret:: { AllocId , GlobalAlloc } ,
1616 mono:: MonoItem ,
@@ -234,7 +234,6 @@ impl Assembly {
234234 name : & str ,
235235 cache : & mut TyCache ,
236236 ) -> Result < ( ) , MethodCodegenError > {
237-
238237 if crate :: utilis:: is_function_magic ( name) {
239238 return Ok ( ( ) ) ;
240239 }
@@ -471,7 +470,10 @@ impl Assembly {
471470 MonoItem :: Fn ( instance) => {
472471 //let instance = crate::utilis::monomorphize(&instance,tcx);
473472 let symbol_name = crate :: utilis:: function_name ( item. symbol_name ( tcx) ) ;
474- let function_compile_timer = tcx. profiler ( ) . generic_activity_with_arg ( "compile function" , item. symbol_name ( tcx) . to_string ( ) ) ;
473+ let function_compile_timer = tcx. profiler ( ) . generic_activity_with_arg (
474+ "compile function" ,
475+ item. symbol_name ( tcx) . to_string ( ) ,
476+ ) ;
475477 self . checked_add_fn ( instance, tcx, & symbol_name, cache)
476478 . expect ( "Could not add function!" ) ;
477479 drop ( function_compile_timer) ;
@@ -482,7 +484,10 @@ impl Assembly {
482484 Ok ( ( ) )
483485 }
484486 MonoItem :: Static ( stotic) => {
485- let static_compile_timer = tcx. profiler ( ) . generic_activity_with_arg ( "compile static initializer" , item. symbol_name ( tcx) . to_string ( ) ) ;
487+ let static_compile_timer = tcx. profiler ( ) . generic_activity_with_arg (
488+ "compile static initializer" ,
489+ item. symbol_name ( tcx) . to_string ( ) ,
490+ ) ;
486491 let alloc = tcx. eval_static_initializer ( stotic) . unwrap ( ) ;
487492 let alloc_id = tcx. reserve_and_set_memory_alloc ( alloc) ;
488493 self . add_allocation ( crate :: utilis:: alloc_id_to_u64 ( alloc_id) , tcx) ;
0 commit comments