Skip to content

Commit 2a544e3

Browse files
committed
Stabilize --json unused-externs(-silent)
Implement rust-lang/compiler-team#674
1 parent 1a740c3 commit 2a544e3

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2630,13 +2630,6 @@ pub fn build_session_options(
26302630

26312631
check_error_format_stability(handler, &unstable_opts, error_format, json_rendered);
26322632

2633-
if !unstable_opts.unstable_options && json_unused_externs.is_enabled() {
2634-
handler.early_error(
2635-
"the `-Z unstable-options` flag must also be passed to enable \
2636-
the flag `--json=unused-externs`",
2637-
);
2638-
}
2639-
26402633
let output_types = parse_output_types(handler, &unstable_opts, matches);
26412634

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

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

Lines changed: 1 addition & 1 deletion
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() {}
Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)