File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1083,6 +1083,18 @@ impl<'a> LoweringContext<'a> {
1083
1083
. chain ( in_band_defs)
1084
1084
. collect ( ) ;
1085
1085
1086
+ // FIXME(const_generics): the compiler doesn't always cope with
1087
+ // unsorted generic parameters at the moment, so we make sure
1088
+ // that they're ordered correctly here for now. (When we chain
1089
+ // the `in_band_defs`, we might make the order unsorted.)
1090
+ lowered_generics. params . sort_by_key ( |param| {
1091
+ match param. kind {
1092
+ hir:: GenericParamKind :: Lifetime { .. } => ParamKindOrd :: Lifetime ,
1093
+ hir:: GenericParamKind :: Type { .. } => ParamKindOrd :: Type ,
1094
+ hir:: GenericParamKind :: Const { .. } => ParamKindOrd :: Const ,
1095
+ }
1096
+ } ) ;
1097
+
1086
1098
( lowered_generics, res)
1087
1099
}
1088
1100
You can’t perform that action at this time.
0 commit comments