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

Generic associated types can shadow lifetimes #67512

Closed
Tracked by #44265
matthewjasper opened this issue Dec 22, 2019 · 0 comments · Fixed by #68938
Closed
Tracked by #44265

Generic associated types can shadow lifetimes #67512

matthewjasper opened this issue Dec 22, 2019 · 0 comments · Fixed by #68938
Labels
A-GATs Area: Generic associated types (GATs) C-bug Category: This is a bug. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthewjasper
Copy link
Contributor

matthewjasper commented Dec 22, 2019

The following code is incorrectly permitted

#![feature(generic_associated_types)]

trait X<'a> {
    type Y<'a>;           //~ Should error
}

impl<'a> X<'a> for () {
    type Y<'a> = &'a ();  //~ Should error
}
@matthewjasper matthewjasper added E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. C-bug Category: This is a bug. F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs labels Dec 22, 2019
@Centril Centril added requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Dec 22, 2019
@matthewjasper matthewjasper removed the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Dec 22, 2019
bors added a commit that referenced this issue Feb 7, 2020
fix lifetime shadowing check in GATs

closes #67512
@bors bors closed this as completed in 998daf3 Feb 14, 2020
@fmease fmease added the A-GATs Area: Generic associated types (GATs) label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-GATs Area: Generic associated types (GATs) C-bug Category: This is a bug. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler 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