summary refs log tree commit diff
path: root/src/test/ui/const-generics/argument_order.min.stderr
blob: afd9ed1a7235dbe956c06f227801c52a1a3e8f05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
error: type parameters must be declared prior to const parameters
  --> $DIR/argument_order.rs:4:28
   |
LL | struct Bad<const N: usize, T> {
   |           -----------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const N: usize>`

error: lifetime parameters must be declared prior to const parameters
  --> $DIR/argument_order.rs:10:32
   |
LL | struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
   |               -----------------^^-----^^-------------------- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T, U, const N: usize, const M: usize>`

error: type parameters must be declared prior to const parameters
  --> $DIR/argument_order.rs:10:36
   |
LL | struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
   |               ---------------------^----------------------^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T, U, const N: usize, const M: usize>`

error[E0747]: lifetime provided when a type was expected
  --> $DIR/argument_order.rs:18:23
   |
LL |     let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
   |                       ^^^^^^^
   |
   = note: lifetime arguments must be provided before type arguments
   = help: reorder the arguments: lifetimes, then types, then consts: `<'a, 'b, T, U, N, M>`

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0747`.