Skip to content

Commit c75d8cb

Browse files
committed
Ordering
1 parent 7a8bd2d commit c75d8cb

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/test/ui/const-generics/defaults/wrong-order.rs

+3
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ struct A<T = u32, const N: usize> {
55
arg: T,
66
}
77

8+
struct Foo<const N: u8 = 3, T>(T);
9+
//~^ error: generic parameters with a default must be trailing
10+
811
fn main() {}

src/test/ui/const-generics/defaults/wrong-order.stderr

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@ error: generic parameters with a default must be trailing
44
LL | struct A<T = u32, const N: usize> {
55
| ^
66

7-
error: aborting due to previous error
7+
error: generic parameters with a default must be trailing
8+
--> $DIR/wrong-order.rs:8:18
9+
|
10+
LL | struct Foo<const N: u8 = 3, T>(T);
11+
| ^
12+
13+
error: aborting due to 2 previous errors
814

0 commit comments

Comments
 (0)