Replace tcx.mk_trait_ref
with ty::TraitRef::new
This commit is contained in:
parent
2d8c905e15
commit
46b01abbcd
41 changed files with 193 additions and 125 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue