about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/lib.rs
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_monomorphize/src/lib.rs
parent2d8c905e159ecc86cb747cbf2c69668b0750ea7b (diff)
downloadrust-46b01abbcd4160f0d4241bc8ec27121713d9abae.tar.gz
rust-46b01abbcd4160f0d4241bc8ec27121713d9abae.zip
Replace `tcx.mk_trait_ref` with `ty::TraitRef::new`
Diffstat (limited to 'compiler/rustc_monomorphize/src/lib.rs')
-rw-r--r--compiler/rustc_monomorphize/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/lib.rs b/compiler/rustc_monomorphize/src/lib.rs
index aea9f719027..c71ee8e74d1 100644
--- a/compiler/rustc_monomorphize/src/lib.rs
+++ b/compiler/rustc_monomorphize/src/lib.rs
@@ -30,8 +30,11 @@ fn custom_coerce_unsize_info<'tcx>(
     source_ty: Ty<'tcx>,
     target_ty: Ty<'tcx>,
 ) -> CustomCoerceUnsized {
-    let trait_ref =
-        ty::Binder::dummy(tcx.mk_trait_ref(LangItem::CoerceUnsized, [source_ty, target_ty]));
+    let trait_ref = ty::Binder::dummy(ty::TraitRef::from_lang_item(
+        tcx,
+        LangItem::CoerceUnsized,
+        [source_ty, target_ty],
+    ));
 
     match tcx.codegen_select_candidate((ty::ParamEnv::reveal_all(), trait_ref)) {
         Ok(traits::ImplSource::UserDefined(traits::ImplSourceUserDefinedData {