Rollup merge of #75473 - JulianKnodt:swap_order_oops, r=varkor

Flip order of const & type

Fix swapped order of consts & types in error message introduced in #74953

r? @varkor cc @lcnr
This commit is contained in:
Yuki Okushi 2020-08-13 11:05:48 +09:00 committed by GitHub
commit 76ac5d61e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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