@@ -131,7 +131,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
131131 & AggregateKind :: Closure ( def_id, _) | & AggregateKind :: Coroutine ( def_id, _) => {
132132 let def_id = def_id. expect_local ( ) ;
133133 let UnsafetyCheckResult { violations, used_unsafe_blocks, .. } =
134- self . tcx . unsafety_check_result ( def_id) ;
134+ self . tcx . mir_unsafety_check_result ( def_id) ;
135135 self . register_violations ( violations, used_unsafe_blocks. items ( ) . copied ( ) ) ;
136136 }
137137 } ,
@@ -153,7 +153,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
153153 if self . tcx . def_kind ( def_id) == DefKind :: InlineConst {
154154 let local_def_id = def_id. expect_local ( ) ;
155155 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) ;
157157 self . register_violations ( violations, used_unsafe_blocks. items ( ) . copied ( ) ) ;
158158 }
159159 }
@@ -390,7 +390,7 @@ impl<'tcx> UnsafetyChecker<'_, 'tcx> {
390390}
391391
392392pub ( crate ) fn provide ( providers : & mut Providers ) {
393- * providers = Providers { unsafety_check_result , ..* providers } ;
393+ * providers = Providers { mir_unsafety_check_result , ..* providers } ;
394394}
395395
396396/// Context information for [`UnusedUnsafeVisitor`] traversal,
@@ -490,7 +490,7 @@ fn check_unused_unsafe(
490490 unused_unsafes
491491}
492492
493- fn unsafety_check_result ( tcx : TyCtxt < ' _ > , def : LocalDefId ) -> & UnsafetyCheckResult {
493+ fn mir_unsafety_check_result ( tcx : TyCtxt < ' _ > , def : LocalDefId ) -> & UnsafetyCheckResult {
494494 debug ! ( "unsafety_violations({:?})" , def) ;
495495
496496 // N.B., this borrow is valid because all the consumers of
@@ -538,7 +538,8 @@ pub fn check_unsafety(tcx: TyCtxt<'_>, def_id: LocalDefId) {
538538 return ;
539539 }
540540
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) ;
542543 // Only suggest wrapping the entire function body in an unsafe block once
543544 let mut suggest_unsafe_block = true ;
544545
0 commit comments