rust/tests/ui/self/self-vs-path-ambiguity.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
278 B
Rust
Raw Normal View History

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