aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/diagnostics.rs')
-rw-r--r--crates/ra_ide/src/diagnostics.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs
index 5c8ea46ab..7ae4bda0b 100644
--- a/crates/ra_ide/src/diagnostics.rs
+++ b/crates/ra_ide/src/diagnostics.rs
@@ -100,8 +100,10 @@ pub(crate) fn diagnostics(
100 }; 100 };
101 101
102 res.borrow_mut().push(Diagnostic { 102 res.borrow_mut().push(Diagnostic {
103 // TODO kb use a smaller range here 103 range: d
104 range, 104 .list_parent_ast(db)
105 .map(|path| path.syntax().text_range())
106 .unwrap_or(range),
105 message: d.message(), 107 message: d.message(),
106 severity: Severity::Error, 108 severity: Severity::Error,
107 fix, 109 fix,