Closed
Description
Given the following code:
t.rs:
fn main() {}
unused.rs:
// empty
rustc --crate-type lib unused.rs
rustc --crate-type bin t.rs --extern unused=libunused.rlib -Dunused-crate-dependencies -Zunstable-options --error-format=json --json unused-externs
The current output is:
{"lint_level":"deny","unused_extern_names":["unused"]}
It reports a "deny" level event as expected, but it does not cause rustc
to exit with a non-zero status.
I think it should since this is a fatal compiler diagnostic, I think it should exit with an error code. Of course a process monitoring the json stream could treat the "deny"
level as a fatal error, but it seems odd to have a special case just for this.