Skip to content

Commit

Permalink
Rollup merge of #75473 - JulianKnodt:swap_order_oops, r=varkor
Browse files Browse the repository at this point in the history
Flip order of const & type

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

r? @varkor cc @lcnr
  • Loading branch information
JohnTitor authored Aug 13, 2020
2 parents 5526c1a + c48d45b commit 76ac5d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustc_ast_passes/ast_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 76ac5d6

Please sign in to comment.