Skip to content

Commit 292cc1e

Browse files
committed
rustc/driver: don't sort base if it only has one element
1 parent 9b01b51 commit 292cc1e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustc_driver/driver.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,9 +1578,10 @@ pub fn collect_crate_types(session: &Session, attrs: &[ast::Attribute]) -> Vec<c
15781578
base.push(::rustc_codegen_utils::link::default_output_for_target(
15791579
session,
15801580
));
1581+
} else {
1582+
base.sort();
1583+
base.dedup();
15811584
}
1582-
base.sort();
1583-
base.dedup();
15841585
}
15851586

15861587
base.retain(|crate_type| {

0 commit comments

Comments
 (0)