rust/tests/ui/const-generics/argument_order.stderr

19 lines
833 B
Plaintext
Raw Normal View History

2022-09-09 07:28:57 -05:00
error: lifetime parameters must be declared prior to type and const parameters
2021-10-23 10:57:49 -05:00
--> $DIR/argument_order.rs:6:32
2020-07-23 06:19:35 -05:00
|
LL | struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
| -----------------^^-----^^-------------------- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, const N: usize, T, const M: usize, U>`
2020-07-23 06:19:35 -05:00
2020-07-23 07:30:01 -05:00
error[E0747]: lifetime provided when a type was expected
2021-10-23 10:57:49 -05:00
--> $DIR/argument_order.rs:13:23
2020-07-23 07:30:01 -05:00
|
LL | let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
| ^^^^^^^
|
= note: lifetime arguments must be provided before type arguments
2022-09-09 07:28:57 -05:00
= help: reorder the arguments: lifetimes, then type and consts: `<'a, 'b, N, T, M, U>`
2020-07-23 07:30:01 -05:00
error: aborting due to 2 previous errors
2020-07-23 07:30:01 -05:00
For more information about this error, try `rustc --explain E0747`.