rust/tests/ui/resolve/incorrect-self-res.rs

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

18 lines
401 B
Rust
Raw Normal View History

fn module() {
fn test(&mut self) {
//~^ ERROR `self` parameter is only allowed in associated functions
}
mod Self {}
//~^ ERROR expected identifier, found keyword `Self`
}
fn trait_() {
fn test(&mut self) {
//~^ ERROR `self` parameter is only allowed in associated functions
}
trait Self {}
//~^ ERROR expected identifier, found keyword `Self`
}
fn main() {}