diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-26 17:38:04 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-26 17:38:08 +0000 |
| commit | 6ab87f82384d0265b486ba2aa41dcf942bd42c4f (patch) | |
| tree | b1d8bc5d6003a0e920632991da6a88214402fe5c /compiler/rustc_hir_analysis/src | |
| parent | 9260be36b2dbd896c6b233d60d1c429a75a0081a (diff) | |
| download | rust-6ab87f82384d0265b486ba2aa41dcf942bd42c4f.tar.gz rust-6ab87f82384d0265b486ba2aa41dcf942bd42c4f.zip | |
Collect item bounds for RPITITs from trait where clauses just like associated types
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect/item_bounds.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect/item_bounds.rs b/compiler/rustc_hir_analysis/src/collect/item_bounds.rs index b2ad42be6c7..5c4cecc02f0 100644 --- a/compiler/rustc_hir_analysis/src/collect/item_bounds.rs +++ b/compiler/rustc_hir_analysis/src/collect/item_bounds.rs @@ -367,20 +367,8 @@ pub(super) fn explicit_item_bounds_with_filter( // a projection self type. Some(ty::ImplTraitInTraitData::Trait { opaque_def_id, .. }) => { let opaque_ty = tcx.hir_node_by_def_id(opaque_def_id.expect_local()).expect_opaque_ty(); - let item_ty = Ty::new_projection_from_args( - tcx, - def_id.to_def_id(), - ty::GenericArgs::identity_for_item(tcx, def_id), - ); - let bounds = opaque_type_bounds( - tcx, - opaque_def_id.expect_local(), - opaque_ty.bounds, - item_ty, - opaque_ty.span, - filter, - ); - assert_only_contains_predicates_from(filter, bounds, item_ty); + let bounds = + associated_type_bounds(tcx, def_id, opaque_ty.bounds, opaque_ty.span, filter); return ty::EarlyBinder::bind(bounds); } Some(ty::ImplTraitInTraitData::Impl { .. }) => span_bug!( |
