Skip to content

Install projection from RPITIT to default trait method opaque correctly #109198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 17, 2023
Merged
Prev Previous commit
Next Next commit
Feed is_type_alias_impl_trait for RPITITs on the trait side
  • Loading branch information
spastorino committed Mar 15, 2023
commit 11f181083136f1a91feb4061c640d8c753e3c5f0
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ rustc_queries! {
{
desc { "determine whether the opaque is a type-alias impl trait" }
separate_provide_extern
feedable
}

query unsizing_params_for_adt(key: DefId) -> &'tcx rustc_index::bit_set::BitSet<u32>
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_ty_utils/src/assoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ fn associated_item_for_impl_trait_in_trait(
InternalSubsts::identity_for_item(tcx, opaque_ty_def_id.to_def_id()),
)));

trait_assoc_ty.is_type_alias_impl_trait(false);

// Copy generics_of of the opaque type item but the trait is the parent.
trait_assoc_ty.generics_of({
let opaque_ty_generics = tcx.generics_of(opaque_ty_def_id);
Expand Down