We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de4b242 commit 3b25e92Copy full SHA for 3b25e92
compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -1004,11 +1004,12 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
1004
}
1005
1006
let mut err_span = self.span;
1007
+ let ty_of_dropped_place = dropped_place.ty(self.body, self.tcx).ty;
1008
- let ty_needs_non_const_drop = qualifs::NeedsNonConstDrop::in_any_value_of_ty(
1009
- self.ccx,
1010
- dropped_place.ty(self.body, self.tcx).ty,
1011
- );
+ let ty_needs_non_const_drop =
+ qualifs::NeedsNonConstDrop::in_any_value_of_ty(self.ccx, ty_of_dropped_place);
+
1012
+ debug!(?ty_of_dropped_place, ?ty_needs_non_const_drop);
1013
1014
if !ty_needs_non_const_drop {
1015
return;
0 commit comments