Skip to content

Commit ee459c6

Browse files
committed
Update for unstable option refactoring.
1 parent 845ec5d commit ee459c6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/librustc/session/config.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -2164,7 +2164,6 @@ fn collect_print_requests(
21642164
cg: &mut CodegenOptions,
21652165
dopts: &mut DebuggingOptions,
21662166
matches: &getopts::Matches,
2167-
is_unstable_enabled: bool,
21682167
error_format: ErrorOutputType,
21692168
) -> Vec<PrintRequest> {
21702169
let mut prints = Vec::<PrintRequest>::new();
@@ -2206,7 +2205,7 @@ fn collect_print_requests(
22062205
"tls-models" => PrintRequest::TlsModels,
22072206
"native-static-libs" => PrintRequest::NativeStaticLibs,
22082207
"target-spec-json" => {
2209-
if is_unstable_enabled {
2208+
if dopts.unstable_options {
22102209
PrintRequest::TargetSpec
22112210
} else {
22122211
early_error(
@@ -2370,7 +2369,6 @@ fn parse_externs(
23702369
matches: &getopts::Matches,
23712370
debugging_opts: &DebuggingOptions,
23722371
error_format: ErrorOutputType,
2373-
is_unstable_enabled: bool,
23742372
) -> Externs {
23752373
if matches.opt_present("extern-private") && !debugging_opts.unstable_options {
23762374
early_error(
@@ -2476,12 +2474,10 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
24762474
);
24772475
}
24782476

2479-
let is_unstable_enabled = nightly_options::is_unstable_enabled(matches);
24802477
let prints = collect_print_requests(
24812478
&mut cg,
24822479
&mut debugging_opts,
24832480
matches,
2484-
is_unstable_enabled,
24852481
error_format,
24862482
);
24872483

@@ -2514,7 +2510,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
25142510
);
25152511
}
25162512

2517-
let externs = parse_externs(matches, &debugging_opts, error_format, is_unstable_enabled);
2513+
let externs = parse_externs(matches, &debugging_opts, error_format);
25182514

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

0 commit comments

Comments
 (0)