diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-25 16:07:48 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-25 16:12:44 +0000 |
| commit | 46b01abbcd4160f0d4241bc8ec27121713d9abae (patch) | |
| tree | 3047ab7b49f67b13795edd9bfc8950d12224254d /compiler/rustc_const_eval/src | |
| parent | 2d8c905e159ecc86cb747cbf2c69668b0750ea7b (diff) | |
| download | rust-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.rs | 8 |
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(); |
