about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/lib.rs
diff options
context:
space:
mode:
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 {