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
727 B
Plaintext
Raw Normal View History

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