]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-before-other-params.min.stderr
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.git] / src / test / ui / const-generics / const-param-before-other-params.min.stderr
1 error: lifetime parameters must be declared prior to const parameters
2   --> $DIR/const-param-before-other-params.rs:5: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:10: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: `()` is forbidden as the type of a const generic parameter
14   --> $DIR/const-param-before-other-params.rs:5:17
15    |
16 LL | fn bar<const X: (), 'a>(_: &'a ()) {
17    |                 ^^
18    |
19    = note: the only supported types are integers, `bool` and `char`
20    = help: more complex types are supported with `#![feature(const_generics)]`
21
22 error: `()` is forbidden as the type of a const generic parameter
23   --> $DIR/const-param-before-other-params.rs:10:17
24    |
25 LL | fn foo<const X: (), T>(_: &T) {}
26    |                 ^^
27    |
28    = note: the only supported types are integers, `bool` and `char`
29    = help: more complex types are supported with `#![feature(const_generics)]`
30
31 error: aborting due to 4 previous errors
32