rust/tests/ui/resolve/use-self-in-inner-fn.rs
2023-01-11 09:32:08 +00:00

15 lines
347 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 function
//~| NOTE use of generic parameter from outer function
//~| NOTE use a type here instead
}
}
}
fn main() {}