aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/generics10.rs
blob: a734fa8a19786da45c9efff65116478441a5bd91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
struct Foo<A, B>(A, B);

impl<X = i32> Foo<X, f32> { // { dg-error "defaults for type parameters are not allowed here" }
    fn new(a: X, b: f32) -> Self {
        Self(a, b)
    }
}

fn main() {
    let a;
    a = Foo::new(123, 456f32);
}