2018-11-16 12:27:27 -06:00
|
|
|
struct Foo {}
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
fn c(foo: u32, self) {}
|
|
|
|
//~^ ERROR unexpected `self` argument in function
|
2018-11-20 07:43:16 -06:00
|
|
|
//~| NOTE `self` is only valid as the first argument of an associated function
|
2018-11-16 12:27:27 -06:00
|
|
|
|
|
|
|
fn good(&mut self, foo: u32) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|