| 1 |
// { dg-additional-options "-w" } |
| 2 |
struct foo; |
| 3 |
|
| 4 |
fn bar() -> self::foo { |
| 5 |
crate::foo |
| 6 |
} |
| 7 |
|
| 8 |
fn baz() { |
| 9 |
let a: foo = self::bar(); |
| 10 |
|
| 11 |
crate::bar(); |
| 12 |
|
| 13 |
crate::self::foo(); |
| 14 |
// { dg-error "leading path segment .self. can only be used at the beginning of a path" "" { target *-*-* } .-1 } |
| 15 |
} |
| 16 |
|
| 17 |
type a = foo; |
| 18 |
type b = crate::foo; |
| 19 |
type c = self::foo; |
| 20 |
type d = crate::self::foo; |
| 21 |
// { dg-error "leading path segment .self. can only be used at the beginning of a path" "" { target *-*-* } .-1 } |