File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
c2rust-transpile/src/c_ast Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1018,7 +1018,7 @@ impl TypedAstContext {
10181018 /// we can look up the [`Translation::expr_override_tys`],
10191019 /// which are set when the macro expansion expressions are converted.
10201020 pub fn sort_top_decls_for_converting ( & mut self ) {
1021- self . c_decls_top . sort_unstable_by_key ( |decl_id| {
1021+ self . c_decls_top . sort_by_key ( |decl_id| {
10221022 let reverse_order = match self . c_decls . get ( decl_id) . unwrap ( ) . kind {
10231023 CDeclKind :: MacroFunction { .. } => 0 ,
10241024 CDeclKind :: MacroObject { .. } => 1 ,
@@ -1033,7 +1033,7 @@ impl TypedAstContext {
10331033 /// This preserves the order when we emit the converted declarations.
10341034 pub fn sort_top_decls_for_emitting ( & mut self ) {
10351035 let mut decls_top = mem:: take ( & mut self . c_decls_top ) ;
1036- decls_top. sort_unstable_by ( |a, b| {
1036+ decls_top. sort_by ( |a, b| {
10371037 let a = self . index ( * a) ;
10381038 let b = self . index ( * b) ;
10391039 use Ordering :: * ;
You can’t perform that action at this time.
0 commit comments