Files
rust/tests/ui/generics/generic-non-trailing-defaults.stderr

22 lines
720 B
Plaintext
Raw Normal View History

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