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
355 B
Rust
Raw Normal View History

struct A;
impl A {
2018-09-05 09:56:01 -07:00
//~^ NOTE `Self` type implicitly declared here, by this `impl`
fn banana(&mut self) {
fn peach(this: &Self) {
2023-09-10 23:06:14 +02:00
//~^ 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() {}