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.
This commit is contained in:
bors 2020-10-10 09:07:35 +00:00
commit 0e022fc2b8
159 changed files with 632 additions and 667 deletions

View file

@ -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"));
}