Skip to content

Commit

Permalink
Flip order of const & type
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKnodt committed Aug 12, 2020
1 parent ef1d58e commit c48d45b
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 c48d45b

Please sign in to comment.