summaryrefslogtreecommitdiff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-04-25 16:07:48 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-04-25 16:12:44 +0000
commit46b01abbcd4160f0d4241bc8ec27121713d9abae (patch)
tree3047ab7b49f67b13795edd9bfc8950d12224254d /compiler/rustc_const_eval/src
parent2d8c905e159ecc86cb747cbf2c69668b0750ea7b (diff)
downloadrust-46b01abbcd4160f0d4241bc8ec27121713d9abae.tar.gz
Replace `tcx.mk_trait_ref` with `ty::TraitRef::new`
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs8
1 files changed, 6 insertions, 2 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 bf688f2b34e..7b65c828c33 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
@@ -157,8 +157,12 @@ impl Qualif for NeedsNonConstDrop {
cx.tcx,
ObligationCause::dummy_with_span(cx.body.span),
cx.param_env,
- ty::Binder::dummy(cx.tcx.at(cx.body.span).mk_trait_ref(LangItem::Destruct, [ty]))
- .with_constness(ty::BoundConstness::ConstIfConst),
+ ty::Binder::dummy(ty::TraitRef::from_lang_item(
+ cx.tcx.at(cx.body.span),
+ LangItem::Destruct,
+ [ty],
+ ))
+ .with_constness(ty::BoundConstness::ConstIfConst),
);
let infcx = cx.tcx.infer_ctxt().build();