| 1 |
#[lang = "sized"] |
| 2 |
pub trait Sized {} |
| 3 |
|
| 4 |
struct Foo<A> { |
| 5 |
a: A, |
| 6 |
} |
| 7 |
|
| 8 |
impl Foo<isize> { |
| 9 |
fn test() -> i32 { // { dg-error "possible candidate" "TODO" { xfail *-*-* } } |
| 10 |
123 |
| 11 |
} |
| 12 |
|
| 13 |
fn bar(self) -> isize { |
| 14 |
self.a |
| 15 |
} |
| 16 |
} |
| 17 |
|
| 18 |
impl Foo<f32> { |
| 19 |
fn test() -> i32 { // { dg-error "possible candidate" "TODO" { xfail *-*-* } } |
| 20 |
123 |
| 21 |
} |
| 22 |
|
| 23 |
fn bar(self) -> f32 { |
| 24 |
self.a |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
fn main() { |
| 29 |
let a: i32 = Foo::test(); // { dg-error "multiple applicable items in scope for: .test." } |
| 30 |
} |
| 31 |
|