Skip to content
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

nested TAITs/ATPITs should reject higher-ranked regions #122093

Closed
compiler-errors opened this issue Mar 6, 2024 · 0 comments · Fixed by #122103
Closed

nested TAITs/ATPITs should reject higher-ranked regions #122093

compiler-errors opened this issue Mar 6, 2024 · 0 comments · Fixed by #122103
Assignees
Labels
A-lifetimes Area: Lifetimes / regions F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@compiler-errors
Copy link
Member

compiler-errors commented Mar 6, 2024

type TAIT = impl for<'a> Foo<'a, Assoc = impl Sized>;
                                         ^^^^^^^^^^

should be a hard error.

@compiler-errors compiler-errors added the F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` label Mar 6, 2024
@compiler-errors compiler-errors self-assigned this Mar 6, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 6, 2024
@compiler-errors compiler-errors changed the title nested TAITs should reject higher-ranked regions nested TAITs/ATPITs should reject higher-ranked regions Mar 6, 2024
@fmease fmease added A-lifetimes Area: Lifetimes / regions T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 6, 2024
@bors bors closed this as completed in d4d18d2 Mar 8, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 8, 2024
Rollup merge of rust-lang#122103 - compiler-errors:taits-capture-everything, r=oli-obk

Make TAITs and ATPITs capture late-bound lifetimes in scope

This generalizes the behavior that RPITs have, where they duplicate their in-scope lifetimes so that they will always *reify* late-bound lifetimes that they capture. This allows TAITs and ATPITs to properly error when they capture in-scope late-bound lifetimes.

r? `@oli-obk` cc `@aliemjay`

Fixes rust-lang#122093 and therefore rust-lang#120700 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: Lifetimes / regions F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants