Skip to content

Commit 35dd4c9

Browse files
committed
Improve comments.
1 parent 94e9402 commit 35dd4c9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/rustc_middle/src/mir/mono.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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,

src/tools/compiletest/src/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 orderso 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
}

0 commit comments

Comments
 (0)