Flip order of const & type
This commit is contained in:
parent
ef1d58e7c9
commit
c48d45bf6b
2 changed files with 2 additions and 2 deletions
|
@ -777,7 +777,7 @@ fn validate_generic_param_order<'a>(
|
||||||
if sess.features_untracked().const_generics {
|
if sess.features_untracked().const_generics {
|
||||||
", then consts and types"
|
", then consts and types"
|
||||||
} else if sess.features_untracked().min_const_generics {
|
} else if sess.features_untracked().min_const_generics {
|
||||||
", then consts, then types"
|
", then types, then consts"
|
||||||
} else {
|
} else {
|
||||||
", then types"
|
", then types"
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,7 +2,7 @@ error: type parameters must be declared prior to const parameters
|
||||||
--> $DIR/needs-feature.rs:10:26
|
--> $DIR/needs-feature.rs:10:26
|
||||||
|
|
|
|
||||||
LL | struct A<const N: usize, T=u32>(T);
|
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
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue