rust/src/test/ui/use-self-in-inner-fn.rs
2018-12-25 21:08:33 -07:00

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