mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Merge commit '0113bc9388
' into sync-from-ra
This commit is contained in:
parent
f43cea0878
commit
b8a3180a60
197 changed files with 3106 additions and 2007 deletions
|
@ -51,7 +51,7 @@ impl FileChange {
|
|||
}
|
||||
|
||||
pub fn apply(self, db: &mut dyn SourceDatabaseExt) {
|
||||
let _p = profile::span("RootDatabase::apply_change");
|
||||
let _p = tracing::span!(tracing::Level::INFO, "RootDatabase::apply_change").entered();
|
||||
if let Some(roots) = self.roots {
|
||||
for (idx, root) in roots.into_iter().enumerate() {
|
||||
let root_id = SourceRootId(idx as u32);
|
||||
|
|
|
@ -494,7 +494,7 @@ impl CrateGraph {
|
|||
from: CrateId,
|
||||
dep: Dependency,
|
||||
) -> Result<(), CyclicDependenciesError> {
|
||||
let _p = profile::span("add_dep");
|
||||
let _p = tracing::span!(tracing::Level::INFO, "add_dep").entered();
|
||||
|
||||
self.check_cycle_after_dependency(from, dep.crate_id)?;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ pub trait SourceDatabase: FileLoader + std::fmt::Debug {
|
|||
}
|
||||
|
||||
fn parse(db: &dyn SourceDatabase, file_id: FileId) -> Parse<ast::SourceFile> {
|
||||
let _p = profile::span("parse_query").detail(|| format!("{file_id:?}"));
|
||||
let _p = tracing::span!(tracing::Level::INFO, "parse_query", ?file_id).entered();
|
||||
let text = db.file_text(file_id);
|
||||
SourceFile::parse(&text)
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ impl<T: SourceDatabaseExt> FileLoader for FileLoaderDelegate<&'_ T> {
|
|||
}
|
||||
|
||||
fn relevant_crates(&self, file_id: FileId) -> Arc<[CrateId]> {
|
||||
let _p = profile::span("relevant_crates");
|
||||
let _p = tracing::span!(tracing::Level::INFO, "relevant_crates").entered();
|
||||
let source_root = self.0.file_source_root(file_id);
|
||||
self.0.source_root_crates(source_root)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue