mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
chore: Prefer tracing span shorthand macros
This commit is contained in:
parent
5f3de7863a
commit
27182bb96b
82 changed files with 240 additions and 275 deletions
|
@ -585,8 +585,7 @@ impl CompletionContext<'_> {
|
|||
/// A version of [`SemanticsScope::process_all_names`] that filters out `#[doc(hidden)]` items and
|
||||
/// passes all doc-aliases along, to funnel it into [`Completions::add_path_resolution`].
|
||||
pub(crate) fn process_all_names(&self, f: &mut dyn FnMut(Name, ScopeDef, Vec<SmolStr>)) {
|
||||
let _p =
|
||||
tracing::span!(tracing::Level::INFO, "CompletionContext::process_all_names").entered();
|
||||
let _p = tracing::info_span!("CompletionContext::process_all_names").entered();
|
||||
self.scope.process_all_names(&mut |name, def| {
|
||||
if self.is_scope_def_hidden(def) {
|
||||
return;
|
||||
|
@ -597,8 +596,7 @@ impl CompletionContext<'_> {
|
|||
}
|
||||
|
||||
pub(crate) fn process_all_names_raw(&self, f: &mut dyn FnMut(Name, ScopeDef)) {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "CompletionContext::process_all_names_raw")
|
||||
.entered();
|
||||
let _p = tracing::info_span!("CompletionContext::process_all_names_raw").entered();
|
||||
self.scope.process_all_names(f);
|
||||
}
|
||||
|
||||
|
@ -656,7 +654,7 @@ impl<'a> CompletionContext<'a> {
|
|||
position @ FilePosition { file_id, offset }: FilePosition,
|
||||
config: &'a CompletionConfig,
|
||||
) -> Option<(CompletionContext<'a>, CompletionAnalysis)> {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "CompletionContext::new").entered();
|
||||
let _p = tracing::info_span!("CompletionContext::new").entered();
|
||||
let sema = Semantics::new(db);
|
||||
|
||||
let original_file = sema.parse(file_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue