about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/transform
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-04-26 11:48:17 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-04-26 11:48:17 +0000
commit1b8c7784e58de489331dd8957a889916a0dcbee3 (patch)
tree17771a54655cbbf234a6f8600c73a931518da1ac /compiler/rustc_const_eval/src/transform
parent4f2532fb531919478b2655925cacb614d8c9f569 (diff)
downloadrust-1b8c7784e58de489331dd8957a889916a0dcbee3.tar.gz
rust-1b8c7784e58de489331dd8957a889916a0dcbee3.zip
Add new `ToPredicate` impls and `TraitRef` methods to remove some `ty::Binber::dummy` calls
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
index 60d4e6ece48..1da20579021 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
@@ -157,13 +157,8 @@ impl Qualif for NeedsNonConstDrop {
             cx.tcx,
             ObligationCause::dummy_with_span(cx.body.span),
             cx.param_env,
-            ty::Binder::dummy(ty::TraitRef::from_lang_item(
-                cx.tcx,
-                LangItem::Destruct,
-                cx.body.span,
-                [ty],
-            ))
-            .with_constness(ty::BoundConstness::ConstIfConst),
+            ty::TraitRef::from_lang_item(cx.tcx, LangItem::Destruct, cx.body.span, [ty])
+                .with_constness(ty::BoundConstness::ConstIfConst),
         );
 
         let infcx = cx.tcx.infer_ctxt().build();