1
Fork 0

Lift TraitRef into rustc_type_ir

This commit is contained in:
Michael Goulet 2024-05-10 14:59:56 -04:00
parent 5e606c0bde
commit 1e5ec0a12c
51 changed files with 445 additions and 241 deletions

View file

@ -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],
);