mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-16 01:33:30 +00:00
Merge #1245
1245: Add profiling to diagnostics r=matklad a=marcogroppo Add profiling to `diagnostics()` - see #1244. Co-authored-by: Marco Groppo <marco.groppo@gmail.com>
This commit is contained in:
commit
3ea25a66a8
@ -8,6 +8,7 @@ use ra_syntax::{
|
|||||||
ast::{self, AstNode},
|
ast::{self, AstNode},
|
||||||
};
|
};
|
||||||
use ra_text_edit::{TextEdit, TextEditBuilder};
|
use ra_text_edit::{TextEdit, TextEditBuilder};
|
||||||
|
use ra_prof::profile;
|
||||||
|
|
||||||
use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase};
|
use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase};
|
||||||
|
|
||||||
@ -18,6 +19,7 @@ pub enum Severity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> {
|
pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> {
|
||||||
|
let _p = profile("diagnostics");
|
||||||
let source_file = db.parse(file_id);
|
let source_file = db.parse(file_id);
|
||||||
let mut res = Vec::new();
|
let mut res = Vec::new();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user