]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/argument_order.stderr
Auto merge of #75293 - poliorcetics:intra-doc-links-std-path, r=jyn514
[rust.git] / src / test / ui / const-generics / argument_order.stderr
1 error: type parameters must be declared prior to const parameters
2   --> $DIR/argument_order.rs:4: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:9: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:9: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 warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
20   --> $DIR/argument_order.rs:1:12
21    |
22 LL | #![feature(const_generics)]
23    |            ^^^^^^^^^^^^^^
24    |
25    = note: `#[warn(incomplete_features)]` on by default
26    = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
27
28 error[E0747]: lifetime provided when a type was expected
29   --> $DIR/argument_order.rs:17:23
30    |
31 LL |     let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
32    |                       ^^^^^^^
33    |
34    = note: lifetime arguments must be provided before type arguments
35    = help: reorder the arguments: lifetimes, then types, then consts: `<'a, 'b, T, U, N, M>`
36
37 error: aborting due to 4 previous errors; 1 warning emitted
38
39 For more information about this error, try `rustc --explain E0747`.