about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2021-09-29 12:12:21 +0000
committerDeadbeef <ent3rm4n@gmail.com>2021-11-24 15:55:21 +0800
commit3b25e92a8fbb5856499a84e02bf393a9c18eb962 (patch)
tree6022deb6414a1ebbccf7385980669fd3e36e2a86
parentde4b242e1e2143f549f25ac5a8f7de9d902ef3b4 (diff)
downloadrust-3b25e92a8fbb5856499a84e02bf393a9c18eb962.tar.gz
rust-3b25e92a8fbb5856499a84e02bf393a9c18eb962.zip
Debug
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/check.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index 2854e6fd396..4e3a8b64094 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -1004,11 +1004,12 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
                 }
 
                 let mut err_span = self.span;
+                let ty_of_dropped_place = dropped_place.ty(self.body, self.tcx).ty;
 
-                let ty_needs_non_const_drop = qualifs::NeedsNonConstDrop::in_any_value_of_ty(
-                    self.ccx,
-                    dropped_place.ty(self.body, self.tcx).ty,
-                );
+                let ty_needs_non_const_drop =
+                    qualifs::NeedsNonConstDrop::in_any_value_of_ty(self.ccx, ty_of_dropped_place);
+
+                debug!(?ty_of_dropped_place, ?ty_needs_non_const_drop);
 
                 if !ty_needs_non_const_drop {
                     return;