mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
fix: Tracing span names should match function names
When viewing traces, it's slightly confusing when the span name doesn't match the function name. Ensure the names are consistent. (It might be worth moving most of these to use #[tracing::instrument] so the name can never go stale. @davidbarsky suggested that is marginally slower, so I've just done the simple change here.)
This commit is contained in:
parent
1bf1f6e0a1
commit
c981ff0944
20 changed files with 31 additions and 31 deletions
|
@ -368,7 +368,7 @@ fn render_resolution_pat(
|
|||
import_to_add: Option<LocatedImport>,
|
||||
resolution: ScopeDef,
|
||||
) -> Builder {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "render_resolution").entered();
|
||||
let _p = tracing::span!(tracing::Level::INFO, "render_resolution_pat").entered();
|
||||
use hir::ModuleDef::*;
|
||||
|
||||
if let ScopeDef::ModuleDef(Macro(mac)) = resolution {
|
||||
|
@ -386,7 +386,7 @@ fn render_resolution_path(
|
|||
import_to_add: Option<LocatedImport>,
|
||||
resolution: ScopeDef,
|
||||
) -> Builder {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "render_resolution").entered();
|
||||
let _p = tracing::span!(tracing::Level::INFO, "render_resolution_path").entered();
|
||||
use hir::ModuleDef::*;
|
||||
|
||||
match resolution {
|
||||
|
@ -494,7 +494,7 @@ fn render_resolution_simple_(
|
|||
import_to_add: Option<LocatedImport>,
|
||||
resolution: ScopeDef,
|
||||
) -> Builder {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "render_resolution").entered();
|
||||
let _p = tracing::span!(tracing::Level::INFO, "render_resolution_simple_").entered();
|
||||
|
||||
let db = ctx.db();
|
||||
let ctx = ctx.import_to_add(import_to_add);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue