From 5ce84f3cbc5d5a3106ea89460da4a3f473618f32 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 25 Mar 2019 09:40:49 +0300 Subject: tweak diagnostics API --- crates/ra_ide_api/src/diagnostics.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_api/src') diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index bf77c9ab1..11391ef02 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs @@ -31,7 +31,7 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec let mut sink = DiagnosticSink::new(|d| { res.borrow_mut().push(Diagnostic { message: d.message(), - range: d.syntax_node().range(), + range: d.highlight_range(), severity: Severity::Error, fix: None, }) @@ -46,7 +46,7 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec cursor_position: None, }; res.borrow_mut().push(Diagnostic { - range: d.syntax_node().range(), + range: d.highlight_range(), message: d.message(), severity: Severity::Error, fix: Some(fix), -- cgit v1.2.3