aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorGabriel Valfridsson <[email protected]>2020-06-12 17:39:50 +0100
committerGabriel Valfridsson <[email protected]>2020-06-12 17:39:50 +0100
commit66291d19f9bedf589b042971b9e89a04e1c5fe72 (patch)
treea12ae54c0ecc32fc2a9145982ce776e7a50eec4c /crates
parentb56ad148db0c69eb279c225f45d324b4e80e7367 (diff)
Revert "Hide squiggly for unused and unnecessary"
This reverts commit 599c105e6fabb2b81c2d0a11b86c0c96f6ab1b88.
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/diagnostics/snapshots/rust_analyzer__diagnostics__to_proto__tests__snap_rustc_unused_variable.snap2
-rw-r--r--crates/rust-analyzer/src/diagnostics/to_proto.rs3
2 files changed, 2 insertions, 3 deletions
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
29 }, 29 },
30 }, 30 },
31 severity: Some( 31 severity: Some(
32 Hint, 32 Warning,
33 ), 33 ),
34 code: Some( 34 code: Some(
35 String( 35 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(
184 return Vec::new(); 184 return Vec::new();
185 } 185 }
186 186
187 let mut severity = map_level_to_severity(rd.level); 187 let severity = map_level_to_severity(rd.level);
188 188
189 let mut source = String::from("rustc"); 189 let mut source = String::from("rustc");
190 let mut code = rd.code.as_ref().map(|c| c.code.clone()); 190 let mut code = rd.code.as_ref().map(|c| c.code.clone());
@@ -226,7 +226,6 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
226 } 226 }
227 227
228 if is_unused_or_unnecessary(rd) { 228 if is_unused_or_unnecessary(rd) {
229 severity = Some(DiagnosticSeverity::Hint);
230 tags.push(DiagnosticTag::Unnecessary); 229 tags.push(DiagnosticTag::Unnecessary);
231 } 230 }
232 231