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