diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-25 16:07:48 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-25 16:12:44 +0000 |
| commit | 46b01abbcd4160f0d4241bc8ec27121713d9abae (patch) | |
| tree | 3047ab7b49f67b13795edd9bfc8950d12224254d /compiler/rustc_monomorphize/src/lib.rs | |
| parent | 2d8c905e159ecc86cb747cbf2c69668b0750ea7b (diff) | |
| download | rust-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.rs | 7 |
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 { |
