Flip order of const & type

This commit is contained in:
kadmin 2020-08-12 23:19:07 +00:00
parent ef1d58e7c9
commit c48d45bf6b
2 changed files with 2 additions and 2 deletions

View File

@ -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"
},

View File

@ -2,7 +2,7 @@ error: type parameters must be declared prior to const parameters
--> $DIR/needs-feature.rs:10:26
|
LL | struct A<const N: usize, T=u32>(T);
| -----------------^----- help: reorder the parameters: lifetimes, then consts, then types: `<T, const N: usize>`
| -----------------^----- help: reorder the parameters: lifetimes, then types, then consts: `<T, const N: usize>`
error: aborting due to previous error