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