2016-10-19 23:33:41 +03:00
|
|
|
// Check that `self::foo` is parsed as a general pattern and not a self argument.
|
2015-02-09 20:01:45 +01:00
|
|
|
|
2016-10-19 23:33:41 +03:00
|
|
|
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
|
2013-08-24 23:16:06 +02:00
|
|
|
}
|
2016-10-19 23:33:41 +03:00
|
|
|
|
|
|
|
fn main() {}
|