]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-before-other-params.stderr
Move generic arg / param validation to `create_substs_for_generic_args`
[rust.git] / src / test / ui / const-generics / const-param-before-other-params.stderr
1 error: lifetime parameters must be declared prior to const parameters
2   --> $DIR/const-param-before-other-params.rs:4:21
3    |
4 LL | fn bar<const X: (), 'a>(_: &'a ()) {
5    |       --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>`
6
7 error: type parameters must be declared prior to const parameters
8   --> $DIR/const-param-before-other-params.rs:8:21
9    |
10 LL | fn foo<const X: (), T>(_: &T) {
11    |       --------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const X: ()>`
12
13 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
14   --> $DIR/const-param-before-other-params.rs:1:12
15    |
16 LL | #![feature(const_generics)]
17    |            ^^^^^^^^^^^^^^
18    |
19    = note: `#[warn(incomplete_features)]` on by default
20
21 error: aborting due to 2 previous errors
22