File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
compiler/rustc_middle/src/mir
src/tools/compiletest/src Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -525,14 +525,14 @@ impl<'tcx> CodegenUnit<'tcx> {
525525 tcx : TyCtxt < ' tcx > ,
526526 ) -> Vec < ( MonoItem < ' tcx > , MonoItemData ) > {
527527 // The codegen tests rely on items being process in the same order as
528- // they appear in the file, so for local items, we sort by node_id first
528+ // they appear in the file, so for local items, we sort by span and
529+ // def_path first
529530 #[ derive( PartialEq , Eq , PartialOrd , Ord ) ]
530531 struct ItemSortKey < ' tcx > ( Option < Span > , Option < String > , SymbolName < ' tcx > ) ;
531532
532- // We only want to take HirIds of user-defined
533- // instances into account. The others don't matter for
534- // the codegen tests and can even make item order
535- // unstable.
533+ // We only want to take HirIds of user-defines instances into account.
534+ // The others don't matter for the codegen tests and can even make item
535+ // order unstable.
536536 fn local_item_query < ' tcx , T > (
537537 item : MonoItem < ' tcx > ,
538538 op : impl FnOnce ( DefId ) -> T ,
Original file line number Diff line number Diff line change @@ -1695,7 +1695,7 @@ impl<'test> TestCx<'test> {
16951695 TestMode :: Assembly | TestMode :: Codegen => {
16961696 rustc. arg ( "-Cdebug-assertions=no" ) ;
16971697 // For assembly and codegen tests, we want to use the same order
1698- // of the items of a codegen unit as the source order, so that
1698+ // of the items of a codegen unit as the source order, so that
16991699 // we can compare the output with the source code through filecheck.
17001700 rustc. arg ( "-Zcodegen-source-order" ) ;
17011701 }
You can’t perform that action at this time.
0 commit comments