Skip to content

Commit 76ac5d6

Browse files
authored
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
2 parents 5526c1a + c48d45b commit 76ac5d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_ast_passes/ast_validation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ fn validate_generic_param_order<'a>(
777777
if sess.features_untracked().const_generics {
778778
", then consts and types"
779779
} else if sess.features_untracked().min_const_generics {
780-
", then consts, then types"
780+
", then types, then consts"
781781
} else {
782782
", then types"
783783
},

src/test/ui/const-generics/defaults/needs-feature.min.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: type parameters must be declared prior to const parameters
22
--> $DIR/needs-feature.rs:10:26
33
|
44
LL | struct A<const N: usize, T=u32>(T);
5-
| -----------------^----- help: reorder the parameters: lifetimes, then consts, then types: `<T, const N: usize>`
5+
| -----------------^----- help: reorder the parameters: lifetimes, then types, then consts: `<T, const N: usize>`
66

77
error: aborting due to previous error
88

0 commit comments

Comments
 (0)