mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Move highlighting and matching_brace
This commit is contained in:
parent
a656b891fb
commit
a3711e08dc
7 changed files with 166 additions and 164 deletions
|
@ -1,6 +1,5 @@
|
|||
use itertools::Itertools;
|
||||
use hir::{Problem, source_binder};
|
||||
use ra_ide_api_light::Severity;
|
||||
use ra_db::SourceDatabase;
|
||||
use ra_syntax::{
|
||||
Location, SourceFile, SyntaxKind, TextRange, SyntaxNode,
|
||||
|
@ -11,6 +10,12 @@ use ra_text_edit::{TextEdit, TextEditBuilder};
|
|||
|
||||
use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase};
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub enum Severity {
|
||||
Error,
|
||||
WeakWarning,
|
||||
}
|
||||
|
||||
pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> {
|
||||
let source_file = db.parse(file_id);
|
||||
let mut res = Vec::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue