aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/generics8.rs
blob: 2d30a9ec6025d08aabdae86fd6120ff51b8af3a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[lang = "sized"]
pub trait Sized {}

struct Foo<A, B>(A, B);

impl<T> Foo<i32, T> {
    fn test(a: T) -> T { // { dg-error "duplicate definitions with name .test." }
        a
    }
}

impl Foo<i32, f32> {
    fn test() -> f32 { // { dg-error "duplicate definitions with name .test." }
        123f32
    }
}

fn main() {}