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 Oct 16, 2019
1 parent 40282a1 commit 098ffd9
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 @@ -2221,7 +2221,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 @@ -2263,7 +2262,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 @@ -2427,7 +2426,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 @@ -2533,12 +2531,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 @@ -2571,7 +2567,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 098ffd9

Please sign in to comment.