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:
commit
76ac5d61e4
@ -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"
|
||||
},
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user