@@ -27,7 +27,7 @@ use util;
2727
2828pub struct UnsafetyChecker < ' a , ' tcx : ' a > {
2929 mir : & ' a Mir < ' tcx > ,
30- source_scope_info : & ' a IndexVec < SourceScope , SourceScopeInfo > ,
30+ source_scope_local_data : & ' a IndexVec < SourceScope , SourceScopeLocalData > ,
3131 violations : Vec < UnsafetyViolation > ,
3232 source_info : SourceInfo ,
3333 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
@@ -38,12 +38,12 @@ pub struct UnsafetyChecker<'a, 'tcx: 'a> {
3838
3939impl < ' a , ' gcx , ' tcx > UnsafetyChecker < ' a , ' tcx > {
4040 fn new ( mir : & ' a Mir < ' tcx > ,
41- source_scope_info : & ' a IndexVec < SourceScope , SourceScopeInfo > ,
41+ source_scope_local_data : & ' a IndexVec < SourceScope , SourceScopeLocalData > ,
4242 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
4343 param_env : ty:: ParamEnv < ' tcx > ) -> Self {
4444 Self {
4545 mir,
46- source_scope_info ,
46+ source_scope_local_data ,
4747 violations : vec ! [ ] ,
4848 source_info : SourceInfo {
4949 span : mir. span ,
@@ -147,7 +147,7 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
147147 if util:: is_disaligned ( self . tcx , self . mir , self . param_env , place) {
148148 let source_info = self . source_info ;
149149 let lint_root =
150- self . source_scope_info [ source_info. scope ] . lint_root ;
150+ self . source_scope_local_data [ source_info. scope ] . lint_root ;
151151 self . register_violations ( & [ UnsafetyViolation {
152152 source_info,
153153 description : Symbol :: intern ( "borrow of packed field" ) . as_interned_str ( ) ,
@@ -212,7 +212,7 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
212212 } else if self . tcx . is_foreign_item ( def_id) {
213213 let source_info = self . source_info ;
214214 let lint_root =
215- self . source_scope_info [ source_info. scope ] . lint_root ;
215+ self . source_scope_local_data [ source_info. scope ] . lint_root ;
216216 self . register_violations ( & [ UnsafetyViolation {
217217 source_info,
218218 description : Symbol :: intern ( "use of extern static" ) . as_interned_str ( ) ,
@@ -240,7 +240,7 @@ impl<'a, 'tcx> UnsafetyChecker<'a, 'tcx> {
240240 fn register_violations ( & mut self ,
241241 violations : & [ UnsafetyViolation ] ,
242242 unsafe_blocks : & [ ( ast:: NodeId , bool ) ] ) {
243- let within_unsafe = match self . source_scope_info [ self . source_info . scope ] . safety {
243+ let within_unsafe = match self . source_scope_local_data [ self . source_info . scope ] . safety {
244244 Safety :: Safe => {
245245 for violation in violations {
246246 if !self . violations . contains ( violation) {
@@ -327,7 +327,7 @@ fn unsafety_check_result<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId)
327327 // `mir_built` force this.
328328 let mir = & tcx. mir_built ( def_id) . borrow ( ) ;
329329
330- let source_scope_info = match mir. source_scope_info {
330+ let source_scope_local_data = match mir. source_scope_local_data {
331331 ClearCrossCrate :: Set ( ref data) => data,
332332 ClearCrossCrate :: Clear => {
333333 debug ! ( "unsafety_violations: {:?} - remote, skipping" , def_id) ;
@@ -340,7 +340,7 @@ fn unsafety_check_result<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId)
340340
341341 let param_env = tcx. param_env ( def_id) ;
342342 let mut checker = UnsafetyChecker :: new (
343- mir, source_scope_info , tcx, param_env) ;
343+ mir, source_scope_local_data , tcx, param_env) ;
344344 checker. visit_mir ( mir) ;
345345
346346 check_unused_unsafe ( tcx, def_id, & checker. used_unsafe , & mut checker. inherited_blocks ) ;
0 commit comments