| 1 |
// { dg-additional-options "-frust-compile-until=nameresolution" } |
| 2 |
struct MyStruct; |
| 3 |
|
| 4 |
trait X {} |
| 5 |
|
| 6 |
fn test_a(); |
| 7 |
// { dg-error "free function without a body" "" { target *-*-* } .-1 } |
| 8 |
|
| 9 |
impl MyStruct { |
| 10 |
fn test_b<T>() |
| 11 |
// { dg-error "associated function in .impl. without body" "" { target *-*-* } .-1 } |
| 12 |
where |
| 13 |
T: Copy; |
| 14 |
|
| 15 |
fn test_c<T>(); |
| 16 |
// { dg-error "associated function in .impl. without body" "" { target *-*-* } .-1 } |
| 17 |
} |
| 18 |
|
| 19 |
impl X for MyStruct { |
| 20 |
fn test_d(); |
| 21 |
// { dg-error "associated function in .impl. without body" "" { target *-*-* } .-1 } |
| 22 |
} |