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> {
525
525
tcx : TyCtxt < ' tcx > ,
526
526
) -> Vec < ( MonoItem < ' tcx > , MonoItemData ) > {
527
527
// 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
529
530
#[ derive( PartialEq , Eq , PartialOrd , Ord ) ]
530
531
struct ItemSortKey < ' tcx > ( Option < Span > , Option < String > , SymbolName < ' tcx > ) ;
531
532
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.
536
536
fn local_item_query < ' tcx , T > (
537
537
item : MonoItem < ' tcx > ,
538
538
op : impl FnOnce ( DefId ) -> T ,
Original file line number Diff line number Diff line change @@ -1695,7 +1695,7 @@ impl<'test> TestCx<'test> {
1695
1695
TestMode :: Assembly | TestMode :: Codegen => {
1696
1696
rustc. arg ( "-Cdebug-assertions=no" ) ;
1697
1697
// 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
1699
1699
// we can compare the output with the source code through filecheck.
1700
1700
rustc. arg ( "-Zcodegen-source-order" ) ;
1701
1701
}
You can’t perform that action at this time.
0 commit comments