2021-03-01 11:50:09 +00:00
|
|
|
error: generic parameters with a default must be trailing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/generic-non-trailing-defaults.rs:3:12
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | struct Vec<A = Heap, T>(A, T);
|
|
|
|
| ^
|
|
|
|
|
2021-03-01 11:50:09 +00:00
|
|
|
error: generic parameters with a default must be trailing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/generic-non-trailing-defaults.rs:6:15
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | struct Foo<A, B = Vec<C>, C>(A, B, C);
|
|
|
|
| ^
|
|
|
|
|
2025-03-09 06:00:54 +00:00
|
|
|
error[E0128]: generic parameter defaults cannot reference parameters before they are declared
|
2021-04-18 11:57:22 +00:00
|
|
|
--> $DIR/generic-non-trailing-defaults.rs:6:23
|
|
|
|
|
|
|
|
|
LL | struct Foo<A, B = Vec<C>, C>(A, B, C);
|
2025-03-09 06:00:54 +00:00
|
|
|
| ^ cannot reference `C` before it is declared
|
2021-04-18 11:57:22 +00:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2021-04-18 11:57:22 +00:00
|
|
|
For more information about this error, try `rustc --explain E0128`.
|