]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/argument_order.min.stderr
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / argument_order.min.stderr
1 error: type parameters must be declared prior to const parameters
2   --> $DIR/argument_order.rs:6:28
3    |
4 LL | struct Bad<const N: usize, T> {
5    |           -----------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const N: usize>`
6
7 error: lifetime parameters must be declared prior to const parameters
8   --> $DIR/argument_order.rs:12:32
9    |
10 LL | struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
11    |               -----------------^^-----^^-------------------- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T, U, const N: usize, const M: usize>`
12
13 error: type parameters must be declared prior to const parameters
14   --> $DIR/argument_order.rs:12:36
15    |
16 LL | struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
17    |               ---------------------^----------------------^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T, U, const N: usize, const M: usize>`
18
19 error[E0747]: lifetime provided when a type was expected
20   --> $DIR/argument_order.rs:20:23
21    |
22 LL |     let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
23    |                       ^^^^^^^
24    |
25    = note: lifetime arguments must be provided before type arguments
26    = help: reorder the arguments: lifetimes, then types, then consts: `<'a, 'b, T, U, N, M>`
27
28 error: aborting due to 4 previous errors
29
30 For more information about this error, try `rustc --explain E0747`.