chore: Prefer tracing span shorthand macros

This commit is contained in:
Wilfred Hughes 2024-06-06 16:52:25 -07:00
parent 5f3de7863a
commit 27182bb96b
82 changed files with 240 additions and 275 deletions

View file

@ -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());