rust/tests/ui/resolve/use-self-in-inner-fn.rs
León Orell Valerian Liehr b00e408e61
Generalize E0401
2023-09-10 23:06:14 +02:00

15 lines
355 B
Rust

struct A;
impl A {
//~^ NOTE `Self` type implicitly declared here, by this `impl`
fn banana(&mut self) {
fn peach(this: &Self) {
//~^ ERROR can't use generic parameters from outer item
//~| NOTE use of generic parameter from outer item
//~| NOTE refer to the type directly here instead
}
}
}
fn main() {}