From c48d45bf6bb54cfa1b5b6176daa8e438767d0a30 Mon Sep 17 00:00:00 2001 From: kadmin Date: Wed, 12 Aug 2020 23:19:07 +0000 Subject: [PATCH] Flip order of const & type --- src/librustc_ast_passes/ast_validation.rs | 2 +- src/test/ui/const-generics/defaults/needs-feature.min.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_ast_passes/ast_validation.rs b/src/librustc_ast_passes/ast_validation.rs index 244377dfa1d2c..3c2a063cf2481 100644 --- a/src/librustc_ast_passes/ast_validation.rs +++ b/src/librustc_ast_passes/ast_validation.rs @@ -777,7 +777,7 @@ fn validate_generic_param_order<'a>( if sess.features_untracked().const_generics { ", then consts and types" } else if sess.features_untracked().min_const_generics { - ", then consts, then types" + ", then types, then consts" } else { ", then types" }, diff --git a/src/test/ui/const-generics/defaults/needs-feature.min.stderr b/src/test/ui/const-generics/defaults/needs-feature.min.stderr index d57190ea3bbab..7058327fdce15 100644 --- a/src/test/ui/const-generics/defaults/needs-feature.min.stderr +++ b/src/test/ui/const-generics/defaults/needs-feature.min.stderr @@ -2,7 +2,7 @@ error: type parameters must be declared prior to const parameters --> $DIR/needs-feature.rs:10:26 | LL | struct A(T); - | -----------------^----- help: reorder the parameters: lifetimes, then consts, then types: `` + | -----------------^----- help: reorder the parameters: lifetimes, then types, then consts: `` error: aborting due to previous error