]> git.lizzy.rs Git - rust.git/blob - tests/ui/invalid-self-argument/trait-fn.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / invalid-self-argument / trait-fn.rs
1 struct Foo {}
2
3 impl Foo {
4     fn c(foo: u32, self) {}
5     //~^ ERROR unexpected `self` parameter in function
6     //~| NOTE must be the first parameter of an associated function
7
8     fn good(&mut self, foo: u32) {}
9 }
10
11 fn main() { }