mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
tweak diagnostics API
This commit is contained in:
parent
4c4a714328
commit
5ce84f3cbc
3 changed files with 16 additions and 11 deletions
|
@ -31,7 +31,7 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic>
|
|||
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<Diagnostic>
|
|||
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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue