Emit the lint level of the unused-crate-dependencies

Also, turn off the lint when the unused dependencies json flag
is specified so that cargo doesn't have to supress the lint
This commit is contained in:
est31
2020-08-10 01:57:35 +02:00
parent 13371b59ee
commit 3a62eb74db
6 changed files with 66 additions and 19 deletions

View File

@@ -196,7 +196,7 @@ pub trait Emitter {
fn emit_future_breakage_report(&mut self, _diags: Vec<(FutureBreakage, Diagnostic)>) {}
/// Emit list of unused externs
fn emit_unused_externs(&mut self, _unused_externs: &[&str]) {}
fn emit_unused_externs(&mut self, _lint_level: &str, _unused_externs: &[&str]) {}
/// Checks if should show explanations about "rustc --explain"
fn should_show_explain(&self) -> bool {