about summary refs log tree commit diff
path: root/compiler/rustc_driver/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-10 09:07:35 +0000
committerbors <bors@rust-lang.org>2020-10-10 09:07:35 +0000
commit0e022fc2b8eecbc16c090a99efbbd262c37ec962 (patch)
tree391505974d54c0bcee080445d415c53c677b78e7 /compiler/rustc_driver/src
parent1661f77e7b38546547207158bff2488411dd6697 (diff)
parent1444ad7ba1c34685fecf7b0413403151aba51e9d (diff)
downloadrust-0e022fc2b8eecbc16c090a99efbbd262c37ec962.tar.gz
rust-0e022fc2b8eecbc16c090a99efbbd262c37ec962.zip
Auto merge of #77580 - petrochenkov:norestarg, r=matthewjasper
rustc_target: Refactor away `TargetResult`

Follow-up to https://github.com/rust-lang/rust/pull/77202.

Construction of a built-in target is always infallible now, so `TargetResult` is no longer necessary.

The second commit contains some further cleanup based on built-in target construction being infallible.
Diffstat (limited to 'compiler/rustc_driver/src')
-rw-r--r--compiler/rustc_driver/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs
index 066a61a7a7b..dd9643913ed 100644
--- a/compiler/rustc_driver/src/lib.rs
+++ b/compiler/rustc_driver/src/lib.rs
@@ -671,7 +671,8 @@ impl RustcDefaultCalls {
         for req in &sess.opts.prints {
             match *req {
                 TargetList => {
-                    let mut targets = rustc_target::spec::get_targets().collect::<Vec<String>>();
+                    let mut targets =
+                        rustc_target::spec::TARGETS.iter().copied().collect::<Vec<_>>();
                     targets.sort();
                     println!("{}", targets.join("\n"));
                 }