summary refs log tree commit diff
path: root/src/test/ui/const-generics/const-param-before-other-params.min.stderr
blob: a9349ce43c94e7f2456f348c17c346f7e85206ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
error: lifetime parameters must be declared prior to const parameters
  --> $DIR/const-param-before-other-params.rs:5:21
   |
LL | fn bar<const X: (), 'a>(_: &'a ()) {
   |       --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>`

error: type parameters must be declared prior to const parameters
  --> $DIR/const-param-before-other-params.rs:10:21
   |
LL | fn foo<const X: (), T>(_: &T) {}
   |       --------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const X: ()>`

error: `()` is forbidden as the type of a const generic parameter
  --> $DIR/const-param-before-other-params.rs:5:17
   |
LL | fn bar<const X: (), 'a>(_: &'a ()) {
   |                 ^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `()` is forbidden as the type of a const generic parameter
  --> $DIR/const-param-before-other-params.rs:10:17
   |
LL | fn foo<const X: (), T>(_: &T) {}
   |                 ^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: aborting due to 4 previous errors