summaryrefslogtreecommitdiffstats
path: root/src/test/ui/self/self-vs-path-ambiguity.rs
blob: 5a06d56c83f24261c62effe74350fb929215ff12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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() {}