diff options
Diffstat (limited to 'compiler/rustc_monomorphize/src/lib.rs')
| -rw-r--r-- | compiler/rustc_monomorphize/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_monomorphize/src/lib.rs b/compiler/rustc_monomorphize/src/lib.rs index cbab2006186..ddfb42a6f4a 100644 --- a/compiler/rustc_monomorphize/src/lib.rs +++ b/compiler/rustc_monomorphize/src/lib.rs @@ -32,10 +32,9 @@ fn custom_coerce_unsize_info<'tcx>( source_ty: Ty<'tcx>, target_ty: Ty<'tcx>, ) -> Result<CustomCoerceUnsized, ErrorGuaranteed> { - let trait_ref = ty::TraitRef::from_lang_item( + let trait_ref = ty::TraitRef::new( tcx.tcx, - LangItem::CoerceUnsized, - tcx.span, + tcx.require_lang_item(LangItem::CoerceUnsized, Some(tcx.span)), [source_ty, target_ty], ); |
