rust/tests/ui/invalid-self-argument/trait-fn.rs

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

12 lines
231 B
Rust
Raw Normal View History

struct Foo {}
impl Foo {
fn c(foo: u32, self) {}
//~^ ERROR unexpected `self` parameter in function
//~| NOTE must be the first parameter of an associated function
fn good(&mut self, foo: u32) {}
}
fn main() { }