mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
chore: fix a few spans without .entered()
This commit is contained in:
parent
d07f0240fd
commit
5ba37f3f8e
6 changed files with 16 additions and 15 deletions
|
@ -239,7 +239,7 @@ impl Crate {
|
|||
db: &dyn DefDatabase,
|
||||
query: import_map::Query,
|
||||
) -> impl Iterator<Item = Either<ModuleDef, Macro>> {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "query_external_importables");
|
||||
let _p = tracing::span!(tracing::Level::INFO, "query_external_importables").entered();
|
||||
import_map::search_dependencies(db, self.into(), &query).into_iter().map(|item| {
|
||||
match ItemInNs::from(item) {
|
||||
ItemInNs::Types(mod_id) | ItemInNs::Values(mod_id) => Either::Left(mod_id),
|
||||
|
@ -548,7 +548,8 @@ impl Module {
|
|||
acc: &mut Vec<AnyDiagnostic>,
|
||||
style_lints: bool,
|
||||
) {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "Module::diagnostics", name = ?self.name(db));
|
||||
let _p = tracing::span!(tracing::Level::INFO, "Module::diagnostics", name = ?self.name(db))
|
||||
.entered();
|
||||
let def_map = self.id.def_map(db.upcast());
|
||||
for diag in def_map.diagnostics() {
|
||||
if diag.in_module != self.id.local_id {
|
||||
|
@ -4494,7 +4495,7 @@ impl Type {
|
|||
name: Option<&Name>,
|
||||
mut callback: impl FnMut(Function) -> Option<T>,
|
||||
) -> Option<T> {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "iterate_method_candidates");
|
||||
let _p = tracing::span!(tracing::Level::INFO, "iterate_method_candidates").entered();
|
||||
let mut slot = None;
|
||||
|
||||
self.iterate_method_candidates_dyn(
|
||||
|
@ -4582,7 +4583,7 @@ impl Type {
|
|||
name: Option<&Name>,
|
||||
mut callback: impl FnMut(AssocItem) -> Option<T>,
|
||||
) -> Option<T> {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "iterate_path_candidates");
|
||||
let _p = tracing::span!(tracing::Level::INFO, "iterate_path_candidates").entered();
|
||||
let mut slot = None;
|
||||
self.iterate_path_candidates_dyn(
|
||||
db,
|
||||
|
@ -4649,7 +4650,7 @@ impl Type {
|
|||
&'a self,
|
||||
db: &'a dyn HirDatabase,
|
||||
) -> impl Iterator<Item = Trait> + 'a {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "applicable_inherent_traits");
|
||||
let _p = tracing::span!(tracing::Level::INFO, "applicable_inherent_traits").entered();
|
||||
self.autoderef_(db)
|
||||
.filter_map(|ty| ty.dyn_trait())
|
||||
.flat_map(move |dyn_trait_id| hir_ty::all_super_traits(db.upcast(), dyn_trait_id))
|
||||
|
@ -4657,7 +4658,7 @@ impl Type {
|
|||
}
|
||||
|
||||
pub fn env_traits<'a>(&'a self, db: &'a dyn HirDatabase) -> impl Iterator<Item = Trait> + 'a {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "env_traits");
|
||||
let _p = tracing::span!(tracing::Level::INFO, "env_traits").entered();
|
||||
self.autoderef_(db)
|
||||
.filter(|ty| matches!(ty.kind(Interner), TyKind::Placeholder(_)))
|
||||
.flat_map(|ty| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue