From 1444ad7ba1c34685fecf7b0413403151aba51e9d Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Mon, 5 Oct 2020 16:24:04 +0300 Subject: rustc_target: Further simplify loading of built-in targets using the fact that it is infallible. JSON roundtrip check on every rustc run is also removed, it's already performed by unit tests. --- compiler/rustc_driver/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_driver/src/lib.rs') diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 3f50c68e3eb..23ed3918c8b 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -672,7 +672,8 @@ impl RustcDefaultCalls { for req in &sess.opts.prints { match *req { TargetList => { - let mut targets = rustc_target::spec::get_targets().collect::>(); + let mut targets = + rustc_target::spec::TARGETS.iter().copied().collect::>(); targets.sort(); println!("{}", targets.join("\n")); } -- cgit 1.4.1-3-g733a5