about summary refs log tree commit diff
path: root/src/test/ui/const-generics/const-param-before-other-params.stderr
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-05-04 14:38:10 +0100
committervarkor <github@varkor.com>2019-05-04 22:28:08 +0100
commit3e6787cb4cadc036cab3dfee5f7e25f553e6ab24 (patch)
tree02b02d38c64d4ee6da9ddfd662035076c1faf46f /src/test/ui/const-generics/const-param-before-other-params.stderr
parent47f373128a9727f299b3ae53cbf7d26da74abc75 (diff)
downloadrust-3e6787cb4cadc036cab3dfee5f7e25f553e6ab24.tar.gz
rust-3e6787cb4cadc036cab3dfee5f7e25f553e6ab24.zip
Early error for mixing order of const and type parameters
Diffstat (limited to 'src/test/ui/const-generics/const-param-before-other-params.stderr')
-rw-r--r--src/test/ui/const-generics/const-param-before-other-params.stderr12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/ui/const-generics/const-param-before-other-params.stderr b/src/test/ui/const-generics/const-param-before-other-params.stderr
index 78f129e79ea..33f981d1eba 100644
--- a/src/test/ui/const-generics/const-param-before-other-params.stderr
+++ b/src/test/ui/const-generics/const-param-before-other-params.stderr
@@ -4,17 +4,17 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
 
-error: type parameters must be declared prior to const parameters
+error: lifetime 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: ()>`
+LL | fn bar<const X: (), 'a>(_: &'a ()) {
+   |       --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>`
 
-error: lifetime parameters must be declared prior to const parameters
+error: type parameters must be declared prior to const parameters
   --> $DIR/const-param-before-other-params.rs:8:21
    |
-LL | fn bar<const X: (), 'a>(_: &'a ()) {
-   |       --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>`
+LL | fn foo<const X: (), T>(_: &T) {
+   |       --------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const X: ()>`
 
 error: aborting due to 2 previous errors