mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Make --json unused-extern deny/forbid level messages cause exit with error status
Closes: https://github.com/rust-lang/rust/issues/96068
This commit is contained in:
parent
2373599b82
commit
39f2f18463
@ -970,7 +970,13 @@ impl Handler {
|
||||
}
|
||||
|
||||
pub fn emit_unused_externs(&self, lint_level: &str, unused_externs: &[&str]) {
|
||||
self.inner.borrow_mut().emit_unused_externs(lint_level, unused_externs)
|
||||
let mut inner = self.inner.borrow_mut();
|
||||
|
||||
if lint_level == "deny" || lint_level == "forbid" {
|
||||
inner.bump_err_count();
|
||||
}
|
||||
|
||||
inner.emit_unused_externs(lint_level, unused_externs)
|
||||
}
|
||||
|
||||
pub fn update_unstable_expectation_id(
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Check for unused crate dep, no path
|
||||
// Check for unused crate dep, json event, deny, expect compile failure
|
||||
|
||||
// edition:2018
|
||||
// compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Check for unused crate dep, no path
|
||||
// Check for unused crate dep, deny, expect failure
|
||||
|
||||
// edition:2018
|
||||
// compile-flags: -Dunused-crate-dependencies
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Check for unused crate dep, no path
|
||||
// Check for unused crate dep, warn, json event, expect pass
|
||||
|
||||
// edition:2018
|
||||
// check-pass
|
||||
|
Loading…
Reference in New Issue
Block a user