Stabilize --json unused-externs(-silent)
Implement https://github.com/rust-lang/compiler-team/issues/674
This commit is contained in:
parent
29b120740b
commit
fdcb8a9fea
4 changed files with 3 additions and 10 deletions
|
@ -2317,13 +2317,6 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
|
||||||
|
|
||||||
check_error_format_stability(early_dcx, &unstable_opts, error_format);
|
check_error_format_stability(early_dcx, &unstable_opts, error_format);
|
||||||
|
|
||||||
if !unstable_opts.unstable_options && json_unused_externs.is_enabled() {
|
|
||||||
early_dcx.early_fatal(
|
|
||||||
"the `-Z unstable-options` flag must also be passed to enable \
|
|
||||||
the flag `--json=unused-externs`",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
let output_types = parse_output_types(early_dcx, &unstable_opts, matches);
|
let output_types = parse_output_types(early_dcx, &unstable_opts, matches);
|
||||||
|
|
||||||
let mut cg = CodegenOptions::build(early_dcx, matches);
|
let mut cg = CodegenOptions::build(early_dcx, matches);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
//@ compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs-silent --error-format=json
|
//@ compile-flags: -Dunused-crate-dependencies --json unused-externs-silent --error-format=json
|
||||||
//@ aux-crate:bar=bar.rs
|
//@ aux-crate:bar=bar.rs
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Check for unused crate dep, json event, deny, expect compile failure
|
// Check for unused crate dep, json event, deny, expect compile failure
|
||||||
|
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
//@ compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json
|
//@ compile-flags: -Dunused-crate-dependencies --json unused-externs --error-format=json
|
||||||
//@ aux-crate:bar=bar.rs
|
//@ aux-crate:bar=bar.rs
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
//@ compile-flags: -Wunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json
|
//@ compile-flags: -Wunused-crate-dependencies --json unused-externs --error-format=json
|
||||||
//@ aux-crate:bar=bar.rs
|
//@ aux-crate:bar=bar.rs
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue