mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00
18 lines
401 B
Rust
18 lines
401 B
Rust
![]() |
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() {}
|