summary refs log tree commit diff
path: root/src/test/ui/const-generics/const-param-before-other-params.stderr
blob: a43415d0e5a43227cb1201632793c712e7e43e53 (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
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
  --> $DIR/const-param-before-other-params.rs:1:12
   |
LL | #![feature(const_generics)]
   |            ^^^^^^^^^^^^^^

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

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

error: const generics in any position are currently unsupported
  --> $DIR/const-param-before-other-params.rs:4:14
   |
LL | fn foo<const X: (), T>(_: T) {
   |              ^

error: const generics in any position are currently unsupported
  --> $DIR/const-param-before-other-params.rs:9:14
   |
LL | fn bar<const X: (), 'a>(_: &'a ()) {
   |              ^

error: aborting due to 4 previous errors