File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
compiler/rustc_mir_build/src/build Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 20
20
use rustc_ast:: Attribute ;
21
21
use rustc_data_structures:: fx:: FxHashMap ;
22
22
use rustc_hir:: def_id:: DefId ;
23
+ use rustc_hir:: HirId ;
23
24
use rustc_index:: vec:: IndexVec ;
24
25
use rustc_middle:: {
25
26
mir:: * ,
@@ -33,6 +34,7 @@ mod parse;
33
34
pub ( super ) fn build_custom_mir < ' tcx > (
34
35
tcx : TyCtxt < ' tcx > ,
35
36
did : DefId ,
37
+ hir_id : HirId ,
36
38
thir : & Thir < ' tcx > ,
37
39
expr : ExprId ,
38
40
params : & IndexVec < ParamId , Param < ' tcx > > ,
@@ -67,7 +69,10 @@ pub(super) fn build_custom_mir<'tcx>(
67
69
parent_scope : None ,
68
70
inlined : None ,
69
71
inlined_parent_scope : None ,
70
- local_data : ClearCrossCrate :: Clear ,
72
+ local_data : ClearCrossCrate :: Set ( SourceScopeLocalData {
73
+ lint_root : hir_id,
74
+ safety : Safety :: Safe ,
75
+ } ) ,
71
76
} ) ;
72
77
body. injection_phase = Some ( parse_attribute ( attr) ) ;
73
78
Original file line number Diff line number Diff line change @@ -487,6 +487,7 @@ fn construct_fn<'tcx>(
487
487
return custom:: build_custom_mir (
488
488
tcx,
489
489
fn_def. did . to_def_id ( ) ,
490
+ fn_id,
490
491
thir,
491
492
expr,
492
493
arguments,
You can’t perform that action at this time.
0 commit comments