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