☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
rust
/
compile
/
generics10.rs
☽
☼
gcc/testsuite/rust/compile/generics10.rs
code
plain
raw
1
struct Foo<A, B>(A, B);
2
3
impl<X = i32> Foo<X, f32> { // { dg-error "defaults for type parameters are only allowed in .struct., .enum., .type., or .trait. definitions" }
4
fn new(a: X, b: f32) -> Self {
5
Self(a, b)
6
}
7
}
8
9
fn main() {
10
let a;
11
a = Foo::new(123, 456f32);
12
}