summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/traits5.rs
blob: 445b0658f5c29f32e492f953d72bdce4b4014f1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
trait Foo {
    type A;
    type B;

    fn new(a: Self::A, b: Self::B) -> Self;
}

struct Baz(i32, f32);

impl Foo for Baz {
    type A = i32;
    type B = f32;

    fn new(a: i32, b: f32) -> Self {
        Baz(a, b)
    }
}

fn main() {
    Baz::new(123, 456f32);
}