rust/tests/ui/resolve/use-self-in-inner-fn.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
347 B
Rust
Raw Normal View History

struct A;
impl A {
2018-09-05 16:56:01 +00:00
//~^ 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
2018-09-05 15:39:50 +00:00
//~| NOTE use a type here instead
}
}
}
fn main() {}