diff options
Diffstat (limited to 'compiler/rustc_mir_transform/src/check_unsafety.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/check_unsafety.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/check_unsafety.rs b/compiler/rustc_mir_transform/src/check_unsafety.rs index f246de55ca8..23726e49f4d 100644 --- a/compiler/rustc_mir_transform/src/check_unsafety.rs +++ b/compiler/rustc_mir_transform/src/check_unsafety.rs @@ -242,7 +242,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> { let assigned_ty = place.ty(&self.body.local_decls, self.tcx).ty; if assigned_ty.needs_drop(self.tcx, self.param_env) { // This would be unsafe, but should be outright impossible since we reject such unions. - self.tcx.sess.span_delayed_bug( + self.tcx.dcx().span_delayed_bug( self.source_info.span, format!("union fields that need dropping should be impossible: {assigned_ty}") ); @@ -568,7 +568,7 @@ pub fn check_unsafety(tcx: TyCtxt<'_>, def_id: LocalDefId) { } else { None }; - tcx.sess.emit_err(errors::RequiresUnsafe { + tcx.dcx().emit_err(errors::RequiresUnsafe { span: source_info.span, enclosing, details, |
