Skip to content

Commit 361872c

Browse files
committed
Stabilize --json unused-externs(-silent)
Implement rust-lang/compiler-team#674
1 parent 5ede940 commit 361872c

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

compiler/rustc_session/src/config.rs

-7
Original file line numberDiff line numberDiff line change
@@ -2615,13 +2615,6 @@ pub fn build_session_options(
26152615

26162616
check_error_format_stability(handler, &unstable_opts, error_format, json_rendered);
26172617

2618-
if !unstable_opts.unstable_options && json_unused_externs.is_enabled() {
2619-
handler.early_error(
2620-
"the `-Z unstable-options` flag must also be passed to enable \
2621-
the flag `--json=unused-externs`",
2622-
);
2623-
}
2624-
26252618
let output_types = parse_output_types(handler, &unstable_opts, matches);
26262619

26272620
let mut cg = CodegenOptions::build(handler, matches);

tests/ui/unused-crate-deps/deny-cmdline-json-silent.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// edition:2018
44
// check-pass
5-
// compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs-silent --error-format=json
5+
// compile-flags: -Dunused-crate-dependencies --json unused-externs-silent --error-format=json
66
// aux-crate:bar=bar.rs
77

88
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Check for unused crate dep, json event, deny, expect compile failure
22

33
// edition:2018
4-
// compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json
4+
// compile-flags: -Dunused-crate-dependencies --json unused-externs --error-format=json
55
// aux-crate:bar=bar.rs
66

77
fn main() {}

tests/ui/unused-crate-deps/warn-cmdline-json.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// edition:2018
44
// check-pass
5-
// compile-flags: -Wunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json
5+
// compile-flags: -Wunused-crate-dependencies --json unused-externs --error-format=json
66
// aux-crate:bar=bar.rs
77

88
fn main() {}

0 commit comments

Comments
 (0)