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

@ -31,7 +31,7 @@ struct LexError {
impl<'a> LexedStr<'a> {
pub fn new(text: &'a str) -> LexedStr<'a> {
let _p = tracing::span!(tracing::Level::INFO, "LexedStr::new").entered();
let _p = tracing::info_span!("LexedStr::new").entered();
let mut conv = Converter::new(text);
if let Some(shebang_len) = rustc_lexer::strip_shebang(text) {
conv.res.push(SHEBANG, conv.offset);

View file

@ -89,7 +89,7 @@ pub enum TopEntryPoint {
impl TopEntryPoint {
pub fn parse(&self, input: &Input, edition: Edition) -> Output {
let _p = tracing::span!(tracing::Level::INFO, "TopEntryPoint::parse", ?self).entered();
let _p = tracing::info_span!("TopEntryPoint::parse", ?self).entered();
let entry_point: fn(&'_ mut parser::Parser<'_>) = match self {
TopEntryPoint::SourceFile => grammar::entry::top::source_file,
TopEntryPoint::MacroStmts => grammar::entry::top::macro_stmts,

View file

@ -26,7 +26,7 @@ pub enum StrStep<'a> {
impl LexedStr<'_> {
pub fn to_input(&self) -> crate::Input {
let _p = tracing::span!(tracing::Level::INFO, "LexedStr::to_input").entered();
let _p = tracing::info_span!("LexedStr::to_input").entered();
let mut res = crate::Input::default();
let mut was_joint = false;
for i in 0..self.len() {