This commit is contained in:
Ellen 2021-10-20 23:44:50 +01:00
parent 7a8bd2d133
commit c75d8cb212
2 changed files with 10 additions and 1 deletions

View file

@ -5,4 +5,7 @@ struct A<T = u32, const N: usize> {
arg: T,
}
struct Foo<const N: u8 = 3, T>(T);
//~^ error: generic parameters with a default must be trailing
fn main() {}

View file

@ -4,5 +4,11 @@ error: generic parameters with a default must be trailing
LL | struct A<T = u32, const N: usize> {
| ^
error: aborting due to previous error
error: generic parameters with a default must be trailing
--> $DIR/wrong-order.rs:8:18
|
LL | struct Foo<const N: u8 = 3, T>(T);
| ^
error: aborting due to 2 previous errors