File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
c2rust-transpile/src/translator Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -495,10 +495,6 @@ pub fn translate(
495495 } ;
496496
497497 {
498- // Sort the top-level declarations by file and source location so that we
499- // preserve the ordering of all declarations in each file.
500- t. ast_context . sort_top_decls ( ) ;
501-
502498 t. locate_comments ( ) ;
503499
504500 // Headers often pull in declarations that are unused;
@@ -742,6 +738,10 @@ pub fn translate(
742738 } )
743739 . collect :: < HashMap < _ , _ > > ( ) ;
744740
741+ // Sort the top-level declarations by file and source location so that we
742+ // preserve the ordering of all declarations in each file.
743+ t. ast_context . sort_top_decls ( ) ;
744+
745745 for top_id in & t. ast_context . c_decls_top {
746746 let decl = t. ast_context . get_decl ( top_id) . unwrap ( ) ;
747747 let decl_file_id = t. ast_context . file_id ( decl) ;
You can’t perform that action at this time.
0 commit comments