Skip to content

Suggest use of --print target-list when target is not found. #35129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from Jul 31, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use syntax::parse;
use syntax::parse::token::InternedString;
use syntax::feature_gate::UnstableFeatures;

use errors::{ColorConfig, Handler};
use errors::{ColorConfig, FatalError, Handler};

use getopts;
use std::collections::HashMap;
Expand Down Expand Up @@ -836,7 +836,10 @@ pub fn build_target_config(opts: &Options, sp: &Handler) -> Config {
let target = match Target::search(&opts.target_triple) {
Ok(t) => t,
Err(e) => {
panic!(sp.fatal(&format!("Error loading target specification: {}", e)));
sp.struct_fatal(&format!("Error loading target specification: {}", e))
.help("Use `--print target-list` for a list of built-in targets")
.emit();
panic!(FatalError);
}
};

Expand Down