diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-10-12 14:28:06 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-10-13 10:09:42 +0200 |
| commit | 292cc1e36fcace60fac19c35b61bb20ab145b057 (patch) | |
| tree | 286e044235986019631e6b826ae2f7058c92d184 | |
| parent | 9b01b51560125338b6594f9919485e6084bee77d (diff) | |
rustc/driver: don't sort base if it only has one element
| -rw-r--r-- | src/librustc_driver/driver.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index 4d42b8315ea..688e083ac47 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -1578,9 +1578,10 @@ pub fn collect_crate_types(session: &Session, attrs: &[ast::Attribute]) -> Vec<c base.push(::rustc_codegen_utils::link::default_output_for_target( session, )); + } else { + base.sort(); + base.dedup(); } - base.sort(); - base.dedup(); } base.retain(|crate_type| { |
