rust/src/test/ui/invalid-self-argument/bare-fn-start.rs

7 lines
204 B
Rust
Raw Normal View History

fn a(&self) { }
//~^ ERROR unexpected `self` parameter in function
//~| NOTE not valid as function parameter
//~| NOTE `self` is only valid as the first parameter of an associated function
fn main() { }