aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/imp.rs
diff options
context:
space:
mode:
authorgfreezy <[email protected]>2018-12-23 16:39:33 +0000
committergfreezy <[email protected]>2018-12-23 16:39:33 +0000
commit346638c8098fefd0b6fa3cf81fbdf22ebfaab9be (patch)
tree9c3065ad2d909786f802fbd1b4c2571cb2287482 /crates/ra_analysis/src/imp.rs
parent000aacafda209826b9b5aac86d175152d488f05b (diff)
add serverity to vscode diagnostics
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r--crates/ra_analysis/src/imp.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs
index b01382808..e054227a9 100644
--- a/crates/ra_analysis/src/imp.rs
+++ b/crates/ra_analysis/src/imp.rs
@@ -3,7 +3,7 @@ use std::{
3 sync::Arc, 3 sync::Arc,
4}; 4};
5 5
6use ra_editor::{self, find_node_at_offset, FileSymbol, LineIndex, LocalEdit}; 6use ra_editor::{self, find_node_at_offset, FileSymbol, LineIndex, LocalEdit, Severity};
7use ra_syntax::{ 7use ra_syntax::{
8 ast::{self, ArgListOwner, Expr, NameOwner}, 8 ast::{self, ArgListOwner, Expr, NameOwner},
9 AstNode, SourceFileNode, 9 AstNode, SourceFileNode,
@@ -364,6 +364,7 @@ impl AnalysisImpl {
364 .map(|d| Diagnostic { 364 .map(|d| Diagnostic {
365 range: d.range, 365 range: d.range,
366 message: d.msg, 366 message: d.msg,
367 severity: d.severity,
367 fix: None, 368 fix: None,
368 }) 369 })
369 .collect::<Vec<_>>(); 370 .collect::<Vec<_>>();
@@ -385,6 +386,7 @@ impl AnalysisImpl {
385 Diagnostic { 386 Diagnostic {
386 range: name_node.range(), 387 range: name_node.range(),
387 message: "unresolved module".to_string(), 388 message: "unresolved module".to_string(),
389 severity: Some(Severity::Error),
388 fix: Some(fix), 390 fix: Some(fix),
389 } 391 }
390 } 392 }
@@ -407,6 +409,7 @@ impl AnalysisImpl {
407 Diagnostic { 409 Diagnostic {
408 range: name_node.range(), 410 range: name_node.range(),
409 message: "can't declare module at this location".to_string(), 411 message: "can't declare module at this location".to_string(),
412 severity: Some(Severity::Error),
410 fix: Some(fix), 413 fix: Some(fix),
411 } 414 }
412 } 415 }