@@ -131,7 +131,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
131
131
& AggregateKind :: Closure ( def_id, _) | & AggregateKind :: Coroutine ( def_id, _) => {
132
132
let def_id = def_id. expect_local ( ) ;
133
133
let UnsafetyCheckResult { violations, used_unsafe_blocks, .. } =
134
- self . tcx . unsafety_check_result ( def_id) ;
134
+ self . tcx . mir_unsafety_check_result ( def_id) ;
135
135
self . register_violations ( violations, used_unsafe_blocks. items ( ) . copied ( ) ) ;
136
136
}
137
137
} ,
@@ -153,7 +153,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
153
153
if self . tcx . def_kind ( def_id) == DefKind :: InlineConst {
154
154
let local_def_id = def_id. expect_local ( ) ;
155
155
let UnsafetyCheckResult { violations, used_unsafe_blocks, .. } =
156
- self . tcx . unsafety_check_result ( local_def_id) ;
156
+ self . tcx . mir_unsafety_check_result ( local_def_id) ;
157
157
self . register_violations ( violations, used_unsafe_blocks. items ( ) . copied ( ) ) ;
158
158
}
159
159
}
@@ -390,7 +390,7 @@ impl<'tcx> UnsafetyChecker<'_, 'tcx> {
390
390
}
391
391
392
392
pub ( crate ) fn provide ( providers : & mut Providers ) {
393
- * providers = Providers { unsafety_check_result , ..* providers } ;
393
+ * providers = Providers { mir_unsafety_check_result , ..* providers } ;
394
394
}
395
395
396
396
/// Context information for [`UnusedUnsafeVisitor`] traversal,
@@ -490,7 +490,7 @@ fn check_unused_unsafe(
490
490
unused_unsafes
491
491
}
492
492
493
- fn unsafety_check_result ( tcx : TyCtxt < ' _ > , def : LocalDefId ) -> & UnsafetyCheckResult {
493
+ fn mir_unsafety_check_result ( tcx : TyCtxt < ' _ > , def : LocalDefId ) -> & UnsafetyCheckResult {
494
494
debug ! ( "unsafety_violations({:?})" , def) ;
495
495
496
496
// N.B., this borrow is valid because all the consumers of
@@ -538,7 +538,8 @@ pub fn check_unsafety(tcx: TyCtxt<'_>, def_id: LocalDefId) {
538
538
return ;
539
539
}
540
540
541
- let UnsafetyCheckResult { violations, unused_unsafes, .. } = tcx. unsafety_check_result ( def_id) ;
541
+ let UnsafetyCheckResult { violations, unused_unsafes, .. } =
542
+ tcx. mir_unsafety_check_result ( def_id) ;
542
543
// Only suggest wrapping the entire function body in an unsafe block once
543
544
let mut suggest_unsafe_block = true ;
544
545
0 commit comments