diff options
| author | kadmin <julianknodt@gmail.com> | 2020-08-12 23:19:07 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2020-08-12 23:19:07 +0000 |
| commit | c48d45bf6bb54cfa1b5b6176daa8e438767d0a30 (patch) | |
| tree | fc68c47a8d07a978ed48d5da9c6bfbd1ac649161 | |
| parent | ef1d58e7c90aa9885c906a6eb7398a2b6256d075 (diff) | |
| download | rust-c48d45bf6bb54cfa1b5b6176daa8e438767d0a30.tar.gz rust-c48d45bf6bb54cfa1b5b6176daa8e438767d0a30.zip | |
Flip order of const & type
| -rw-r--r-- | src/librustc_ast_passes/ast_validation.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/const-generics/defaults/needs-feature.min.stderr | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_ast_passes/ast_validation.rs b/src/librustc_ast_passes/ast_validation.rs index 244377dfa1d..3c2a063cf24 100644 --- a/src/librustc_ast_passes/ast_validation.rs +++ b/src/librustc_ast_passes/ast_validation.rs @@ -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" }, diff --git a/src/test/ui/const-generics/defaults/needs-feature.min.stderr b/src/test/ui/const-generics/defaults/needs-feature.min.stderr index d57190ea3bb..7058327fdce 100644 --- a/src/test/ui/const-generics/defaults/needs-feature.min.stderr +++ b/src/test/ui/const-generics/defaults/needs-feature.min.stderr @@ -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 |
