]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-before-other-params.stderr
Rollup merge of #63191 - pietroalbini:really-fix-toolstate, r=alexcrichton
[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:3: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:7: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 error: aborting due to 2 previous errors
14