Skip to content

Commit

Permalink
Update for unstable option refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Nov 7, 2019
1 parent 845ec5d commit ee459c6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,6 @@ fn collect_print_requests(
cg: &mut CodegenOptions,
dopts: &mut DebuggingOptions,
matches: &getopts::Matches,
is_unstable_enabled: bool,
error_format: ErrorOutputType,
) -> Vec<PrintRequest> {
let mut prints = Vec::<PrintRequest>::new();
Expand Down Expand Up @@ -2206,7 +2205,7 @@ fn collect_print_requests(
"tls-models" => PrintRequest::TlsModels,
"native-static-libs" => PrintRequest::NativeStaticLibs,
"target-spec-json" => {
if is_unstable_enabled {
if dopts.unstable_options {
PrintRequest::TargetSpec
} else {
early_error(
Expand Down Expand Up @@ -2370,7 +2369,6 @@ fn parse_externs(
matches: &getopts::Matches,
debugging_opts: &DebuggingOptions,
error_format: ErrorOutputType,
is_unstable_enabled: bool,
) -> Externs {
if matches.opt_present("extern-private") && !debugging_opts.unstable_options {
early_error(
Expand Down Expand Up @@ -2476,12 +2474,10 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
);
}

let is_unstable_enabled = nightly_options::is_unstable_enabled(matches);
let prints = collect_print_requests(
&mut cg,
&mut debugging_opts,
matches,
is_unstable_enabled,
error_format,
);

Expand Down Expand Up @@ -2514,7 +2510,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
);
}

let externs = parse_externs(matches, &debugging_opts, error_format, is_unstable_enabled);
let externs = parse_externs(matches, &debugging_opts, error_format);

let crate_name = matches.opt_str("crate-name");

Expand Down

0 comments on commit ee459c6

Please sign in to comment.