rust/tests/ui/self/self-vs-path-ambiguity.rs
2023-01-11 09:32:08 +00:00

13 lines
278 B
Rust

// Check that `self::foo` is parsed as a general pattern and not a self argument.
struct S;
impl S {
fn f(self::S: S) {}
fn g(&self::S: &S) {}
fn h(&mut self::S: &mut S) {}
fn i(&'a self::S: &S) {} //~ ERROR unexpected lifetime `'a` in pattern
}
fn main() {}