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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
720 B
Plaintext
Raw Normal View History

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);
| ^
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);
| ^ 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`.