mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +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
|
@ -185,7 +185,7 @@ impl ast::Expr {
|
|||
/// ast::Expr::parse("let fail = true;", Edition::CURRENT).tree();
|
||||
/// ```
|
||||
pub fn parse(text: &str, edition: Edition) -> Parse<ast::Expr> {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "Expr::parse").entered();
|
||||
let _p = tracing::info_span!("Expr::parse").entered();
|
||||
let (green, errors) = parsing::parse_text_at(text, parser::TopEntryPoint::Expr, edition);
|
||||
let root = SyntaxNode::new_root(green.clone());
|
||||
|
||||
|
@ -203,7 +203,7 @@ pub use crate::ast::SourceFile;
|
|||
|
||||
impl SourceFile {
|
||||
pub fn parse(text: &str, edition: Edition) -> Parse<SourceFile> {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "SourceFile::parse").entered();
|
||||
let _p = tracing::info_span!("SourceFile::parse").entered();
|
||||
let (green, errors) = parsing::parse_text(text, edition);
|
||||
let root = SyntaxNode::new_root(green.clone());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue