//@ check-fail // // Regression for https://github.com/rust-lang/rust/issues/117446 pub struct Repeated(Vec); trait Foo<'a> { fn outer() -> Option<()>; } impl<'a, T> Foo<'a> for Repeated { fn outer() -> Option<()> { //~^ ERROR associated function `outer` has 0 type parameters but its trait declaration has 1 type parameter [E0049] //~^^ ERROR mismatched types [E0308] fn inner(value: Option<()>) -> Repeated { match value { _ => Self(unimplemented!()), //~^ ERROR can't reference `Self` constructor from outer item [E0401] } } } } fn main() {}