From 60b4fdc2145225e58e07382b7877dd0a5e813941 Mon Sep 17 00:00:00 2001 From: Giacomo Pasini Date: Sun, 1 Jan 2023 21:07:06 +0100 Subject: [PATCH] uncomment drop access kind panic --- .../rustc_borrowck/src/diagnostics/conflict_errors.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs index 6608067db6b7a..3c3cb8c6b9c2a 100644 --- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs @@ -2369,10 +2369,10 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { ProjectionElem::Deref => match kind { StorageDeadOrDrop::LocalStorageDead | StorageDeadOrDrop::BoxedStorageDead => { - // assert!( - // place_ty.ty.is_box(), - // "Drop of value behind a reference or raw pointer" - // ); + assert!( + place_ty.ty.is_box(), + "Drop of value behind a reference or raw pointer" + ); StorageDeadOrDrop::BoxedStorageDead } StorageDeadOrDrop::Destructor(_) => kind,