4862: Revert "Hide squiggly for unused and unnecessary" r=matklad a=GabbeV

This reverts https://github.com/rust-analyzer/rust-analyzer/pull/4721

Co-authored-by: Gabriel Valfridsson <gabriel.valfridsson@gmail.com>
This commit is contained in:
bors[bot] 2020-06-13 11:04:42 +00:00 committed by GitHub
commit 1c841c8a98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -29,7 +29,7 @@ expression: diag
},
},
severity: Some(
Hint,
Warning,
),
code: Some(
String(

View file

@ -184,7 +184,7 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
return Vec::new();
}
let mut severity = map_level_to_severity(rd.level);
let severity = map_level_to_severity(rd.level);
let mut source = String::from("rustc");
let mut code = rd.code.as_ref().map(|c| c.code.clone());
@ -226,7 +226,6 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
}
if is_unused_or_unnecessary(rd) {
severity = Some(DiagnosticSeverity::Hint);
tags.push(DiagnosticTag::Unnecessary);
}