1
+ use crate :: rustc_middle:: dep_graph:: DepContext ;
1
2
use crate :: {
2
3
access_modifier:: AccessModifer ,
3
4
cil:: { CILOp , CallSite } ,
@@ -10,7 +11,6 @@ use crate::{
10
11
r#type:: TypeDef ,
11
12
IString ,
12
13
} ;
13
- use crate :: rustc_middle:: dep_graph:: DepContext ;
14
14
use rustc_middle:: mir:: {
15
15
interpret:: { AllocId , GlobalAlloc } ,
16
16
mono:: MonoItem ,
@@ -234,7 +234,6 @@ impl Assembly {
234
234
name : & str ,
235
235
cache : & mut TyCache ,
236
236
) -> Result < ( ) , MethodCodegenError > {
237
-
238
237
if crate :: utilis:: is_function_magic ( name) {
239
238
return Ok ( ( ) ) ;
240
239
}
@@ -471,7 +470,10 @@ impl Assembly {
471
470
MonoItem :: Fn ( instance) => {
472
471
//let instance = crate::utilis::monomorphize(&instance,tcx);
473
472
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
+ ) ;
475
477
self . checked_add_fn ( instance, tcx, & symbol_name, cache)
476
478
. expect ( "Could not add function!" ) ;
477
479
drop ( function_compile_timer) ;
@@ -482,7 +484,10 @@ impl Assembly {
482
484
Ok ( ( ) )
483
485
}
484
486
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
+ ) ;
486
491
let alloc = tcx. eval_static_initializer ( stotic) . unwrap ( ) ;
487
492
let alloc_id = tcx. reserve_and_set_memory_alloc ( alloc) ;
488
493
self . add_allocation ( crate :: utilis:: alloc_id_to_u64 ( alloc_id) , tcx) ;
0 commit comments