Skip to content

Generic associated types can shadow lifetimes #67512

Closed

Description

@matthewjasper

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
}

Activity

  1. added
    E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
    C-bugCategory: This is a bug.
    on Dec 22, 2019
  2. added
    requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Dec 22, 2019
  3. removed
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Dec 22, 2019
  4. added a commit that references this issue on Feb 7, 2020
    26ab07b
  5. added a commit that references this issue on Feb 13, 2020
    998daf3
  6. added
    A-GATsArea: Generic associated types (GATs)
    on Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-GATsArea: Generic associated types (GATs)C-bugCategory: This is a bug.E-mentorCall 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. GATsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions