rust-lang/rust

Generic associated types can shadow lifetimes

matthewjasper opened this issue · 0 comments

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
}