diff options
Diffstat (limited to 'crates/ra_ide_api/src/diagnostics.rs')
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 069092528..aabb614b9 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -1,6 +1,5 @@ | |||
1 | use itertools::Itertools; | 1 | use itertools::Itertools; |
2 | use hir::{Problem, source_binder}; | 2 | use hir::{Problem, source_binder}; |
3 | use ra_ide_api_light::Severity; | ||
4 | use ra_db::SourceDatabase; | 3 | use ra_db::SourceDatabase; |
5 | use ra_syntax::{ | 4 | use ra_syntax::{ |
6 | Location, SourceFile, SyntaxKind, TextRange, SyntaxNode, | 5 | Location, SourceFile, SyntaxKind, TextRange, SyntaxNode, |
@@ -11,6 +10,12 @@ use ra_text_edit::{TextEdit, TextEditBuilder}; | |||
11 | 10 | ||
12 | use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase}; | 11 | use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase}; |
13 | 12 | ||
13 | #[derive(Debug, Copy, Clone)] | ||
14 | pub enum Severity { | ||
15 | Error, | ||
16 | WeakWarning, | ||
17 | } | ||
18 | |||
14 | pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> { | 19 | pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> { |
15 | let source_file = db.parse(file_id); | 20 | let source_file = db.parse(file_id); |
16 | let mut res = Vec::new(); | 21 | let mut res = Vec::new(); |