From 66291d19f9bedf589b042971b9e89a04e1c5fe72 Mon Sep 17 00:00:00 2001 From: Gabriel Valfridsson Date: Fri, 12 Jun 2020 18:39:50 +0200 Subject: Revert "Hide squiggly for unused and unnecessary" This reverts commit 599c105e6fabb2b81c2d0a11b86c0c96f6ab1b88. --- ...yzer__diagnostics__to_proto__tests__snap_rustc_unused_variable.snap | 2 +- crates/rust-analyzer/src/diagnostics/to_proto.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/diagnostics/snapshots/rust_analyzer__diagnostics__to_proto__tests__snap_rustc_unused_variable.snap b/crates/rust-analyzer/src/diagnostics/snapshots/rust_analyzer__diagnostics__to_proto__tests__snap_rustc_unused_variable.snap index f0273315e..9a7972ff5 100644 --- a/crates/rust-analyzer/src/diagnostics/snapshots/rust_analyzer__diagnostics__to_proto__tests__snap_rustc_unused_variable.snap +++ b/crates/rust-analyzer/src/diagnostics/snapshots/rust_analyzer__diagnostics__to_proto__tests__snap_rustc_unused_variable.snap @@ -29,7 +29,7 @@ expression: diag }, }, severity: Some( - Hint, + Warning, ), code: Some( String( diff --git a/crates/rust-analyzer/src/diagnostics/to_proto.rs b/crates/rust-analyzer/src/diagnostics/to_proto.rs index 04e286780..257910e09 100644 --- a/crates/rust-analyzer/src/diagnostics/to_proto.rs +++ b/crates/rust-analyzer/src/diagnostics/to_proto.rs @@ -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); } -- cgit v1.2.3