aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-07-27 16:45:08 +0100
committerKirill Bulatov <[email protected]>2020-08-11 13:09:08 +0100
commit21e5224484b9214648826e1b15aa9150c79a407c (patch)
tree39825273cf9d97796ef9e1705004c1171d32efab /crates/ra_ide
parent26e102a567aadcf86f2e5b575cb6b915991ba088 (diff)
Custom ranges for missing fields
Diffstat (limited to 'crates/ra_ide')
-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,