From 88262984eb623f683e61e657363459550ba93199 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Thu, 4 Jun 2020 23:05:28 -0400 Subject: [PATCH] Show `SyntaxContext` in formatted `Span` debug output This is only really useful in debug messages, so I've switched to calling `span_to_string` in any place that causes a `Span` to end up in user-visible output. --- src/librustc_interface/callbacks.rs | 2 +- src/librustc_middle/mir/mod.rs | 3 +- src/librustc_middle/ty/print/pretty.rs | 8 ++- src/librustc_mir/borrow_check/nll.rs | 4 +- .../borrow_check/region_infer/dump_mir.rs | 13 +++- src/librustc_mir/util/pretty.rs | 22 +++++-- src/librustc_span/lib.rs | 10 +++- .../debug/dump-debug-span-debug.stderr | 60 +++++++++---------- 8 files changed, 75 insertions(+), 47 deletions(-) diff --git a/src/librustc_interface/callbacks.rs b/src/librustc_interface/callbacks.rs index 913c67d045e59..7fa1a3eb0f591 100644 --- a/src/librustc_interface/callbacks.rs +++ b/src/librustc_interface/callbacks.rs @@ -18,7 +18,7 @@ use std::fmt; fn span_debug(span: rustc_span::Span, f: &mut fmt::Formatter<'_>) -> fmt::Result { tls::with_opt(|tcx| { if let Some(tcx) = tcx { - write!(f, "{}", tcx.sess.source_map().span_to_string(span)) + rustc_span::debug_with_source_map(span, f, tcx.sess.source_map()) } else { rustc_span::default_span_debug(span, f) } diff --git a/src/librustc_middle/mir/mod.rs b/src/librustc_middle/mir/mod.rs index 98973f1b6fb7d..56d3afe961ce9 100644 --- a/src/librustc_middle/mir/mod.rs +++ b/src/librustc_middle/mir/mod.rs @@ -2449,7 +2449,8 @@ impl<'tcx> Debug for Rvalue<'tcx> { tcx.def_path_str_with_substs(def_id.to_def_id(), substs), ) } else { - format!("[closure@{:?}]", tcx.hir().span(hir_id)) + let span = tcx.hir().span(hir_id); + format!("[closure@{}]", tcx.sess.source_map().span_to_string(span)) }; let mut struct_fmt = fmt.debug_struct(&name); diff --git a/src/librustc_middle/ty/print/pretty.rs b/src/librustc_middle/ty/print/pretty.rs index 90fb198161793..017f7270761a4 100644 --- a/src/librustc_middle/ty/print/pretty.rs +++ b/src/librustc_middle/ty/print/pretty.rs @@ -605,7 +605,8 @@ pub trait PrettyPrinter<'tcx>: // FIXME(eddyb) should use `def_span`. if let Some(did) = did.as_local() { let hir_id = self.tcx().hir().as_local_hir_id(did); - p!(write("@{:?}", self.tcx().hir().span(hir_id))); + let span = self.tcx().hir().span(hir_id); + p!(write("@{}", self.tcx().sess.source_map().span_to_string(span))); if substs.as_generator().is_valid() { let upvar_tys = substs.as_generator().upvar_tys(); @@ -653,7 +654,8 @@ pub trait PrettyPrinter<'tcx>: if self.tcx().sess.opts.debugging_opts.span_free_formats { p!(write("@"), print_def_path(did.to_def_id(), substs)); } else { - p!(write("@{:?}", self.tcx().hir().span(hir_id))); + let span = self.tcx().hir().span(hir_id); + p!(write("@{}", self.tcx().sess.source_map().span_to_string(span))); } if substs.as_closure().is_valid() { @@ -1362,7 +1364,7 @@ impl Printer<'tcx> for FmtPrinter<'_, 'tcx, F> { if !self.empty_path { write!(self, "::")?; } - write!(self, "", span)?; + write!(self, "", self.tcx.sess.source_map().span_to_string(span))?; self.empty_path = false; return Ok(self); diff --git a/src/librustc_mir/borrow_check/nll.rs b/src/librustc_mir/borrow_check/nll.rs index 1d3733371473b..375b3210e8c2c 100644 --- a/src/librustc_mir/borrow_check/nll.rs +++ b/src/librustc_mir/borrow_check/nll.rs @@ -314,7 +314,7 @@ pub(super) fn dump_mir_results<'a, 'tcx>( infcx: &InferCtxt<'a, 'tcx>, source: MirSource<'tcx>, body: &Body<'tcx>, - regioncx: &RegionInferenceContext<'_>, + regioncx: &RegionInferenceContext<'tcx>, closure_region_requirements: &Option>, ) { if !mir_util::dump_enabled(infcx.tcx, "nll", source.def_id()) { @@ -325,7 +325,7 @@ pub(super) fn dump_mir_results<'a, 'tcx>( match pass_where { // Before the CFG, dump out the values for each region variable. PassWhere::BeforeCFG => { - regioncx.dump_mir(out)?; + regioncx.dump_mir(infcx.tcx, out)?; writeln!(out, "|")?; if let Some(closure_region_requirements) = closure_region_requirements { diff --git a/src/librustc_mir/borrow_check/region_infer/dump_mir.rs b/src/librustc_mir/borrow_check/region_infer/dump_mir.rs index 369e540231168..d6e48deb031ac 100644 --- a/src/librustc_mir/borrow_check/region_infer/dump_mir.rs +++ b/src/librustc_mir/borrow_check/region_infer/dump_mir.rs @@ -4,7 +4,9 @@ //! context internal state. use super::{OutlivesConstraint, RegionInferenceContext}; +use crate::borrow_check::type_check::Locations; use rustc_infer::infer::NLLRegionVariableOrigin; +use rustc_middle::ty::TyCtxt; use std::io::{self, Write}; // Room for "'_#NNNNr" before things get misaligned. @@ -14,7 +16,7 @@ const REGION_WIDTH: usize = 8; impl<'tcx> RegionInferenceContext<'tcx> { /// Write out our state into the `.mir` files. - pub(crate) fn dump_mir(&self, out: &mut dyn Write) -> io::Result<()> { + pub(crate) fn dump_mir(&self, tcx: TyCtxt<'tcx>, out: &mut dyn Write) -> io::Result<()> { writeln!(out, "| Free Region Mapping")?; for region in self.regions() { @@ -48,7 +50,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { writeln!(out, "|")?; writeln!(out, "| Inference Constraints")?; - self.for_each_constraint(&mut |msg| writeln!(out, "| {}", msg))?; + self.for_each_constraint(tcx, &mut |msg| writeln!(out, "| {}", msg))?; Ok(()) } @@ -59,6 +61,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { /// inference resulted in the values that it did when debugging. fn for_each_constraint( &self, + tcx: TyCtxt<'tcx>, with_msg: &mut dyn FnMut(&str) -> io::Result<()>, ) -> io::Result<()> { for region in self.definitions.indices() { @@ -72,7 +75,11 @@ impl<'tcx> RegionInferenceContext<'tcx> { constraints.sort(); for constraint in &constraints { let OutlivesConstraint { sup, sub, locations, category } = constraint; - with_msg(&format!("{:?}: {:?} due to {:?} at {:?}", sup, sub, category, locations,))?; + let (name, arg) = match locations { + Locations::All(span) => ("All", tcx.sess.source_map().span_to_string(*span)), + Locations::Single(loc) => ("Single", format!("{:?}", loc)), + }; + with_msg(&format!("{:?}: {:?} due to {:?} at {}({})", sup, sub, category, name, arg))?; } Ok(()) diff --git a/src/librustc_mir/util/pretty.rs b/src/librustc_mir/util/pretty.rs index ff386cb218304..02614044063fc 100644 --- a/src/librustc_mir/util/pretty.rs +++ b/src/librustc_mir/util/pretty.rs @@ -135,7 +135,7 @@ fn dump_matched_mir_node<'tcx, F>( } writeln!(file)?; extra_data(PassWhere::BeforeCFG, &mut file)?; - write_user_type_annotations(body, &mut file)?; + write_user_type_annotations(tcx, body, &mut file)?; write_mir_fn(tcx, source, body, &mut extra_data, &mut file)?; extra_data(PassWhere::AfterCFG, &mut file)?; }; @@ -351,7 +351,7 @@ fn write_extra<'tcx, F>(tcx: TyCtxt<'tcx>, write: &mut dyn Write, mut visit_op: where F: FnMut(&mut ExtraComments<'tcx>), { - let mut extra_comments = ExtraComments { _tcx: tcx, comments: vec![] }; + let mut extra_comments = ExtraComments { tcx, comments: vec![] }; visit_op(&mut extra_comments); for comment in extra_comments.comments { writeln!(write, "{:A$} // {}", "", comment, A = ALIGN)?; @@ -360,7 +360,7 @@ where } struct ExtraComments<'tcx> { - _tcx: TyCtxt<'tcx>, // don't need it now, but bet we will soon + tcx: TyCtxt<'tcx>, comments: Vec, } @@ -377,7 +377,7 @@ impl Visitor<'tcx> for ExtraComments<'tcx> { self.super_constant(constant, location); let Constant { span, user_ty, literal } = constant; self.push("mir::Constant"); - self.push(&format!("+ span: {:?}", span)); + self.push(&format!("+ span: {}", self.tcx.sess.source_map().span_to_string(*span))); if let Some(user_ty) = user_ty { self.push(&format!("+ user_ty: {:?}", user_ty)); } @@ -862,12 +862,22 @@ fn write_mir_sig( Ok(()) } -fn write_user_type_annotations(body: &Body<'_>, w: &mut dyn Write) -> io::Result<()> { +fn write_user_type_annotations( + tcx: TyCtxt<'_>, + body: &Body<'_>, + w: &mut dyn Write, +) -> io::Result<()> { if !body.user_type_annotations.is_empty() { writeln!(w, "| User Type Annotations")?; } for (index, annotation) in body.user_type_annotations.iter_enumerated() { - writeln!(w, "| {:?}: {:?} at {:?}", index.index(), annotation.user_ty, annotation.span)?; + writeln!( + w, + "| {:?}: {:?} at {}", + index.index(), + annotation.user_ty, + tcx.sess.source_map().span_to_string(annotation.span) + )?; } if !body.user_type_annotations.is_empty() { writeln!(w, "|")?; diff --git a/src/librustc_span/lib.rs b/src/librustc_span/lib.rs index fbab99b2f8f20..a543fd7df8ce9 100644 --- a/src/librustc_span/lib.rs +++ b/src/librustc_span/lib.rs @@ -726,10 +726,18 @@ pub fn with_source_map T>(source_map: Lrc, f: F) -> f() } +pub fn debug_with_source_map( + span: Span, + f: &mut fmt::Formatter<'_>, + source_map: &SourceMap, +) -> fmt::Result { + write!(f, "{} ({:?})", source_map.span_to_string(span), span.ctxt()) +} + pub fn default_span_debug(span: Span, f: &mut fmt::Formatter<'_>) -> fmt::Result { GLOBALS.with(|globals| { if let Some(source_map) = &*globals.source_map.borrow() { - write!(f, "{}", source_map.span_to_string(span)) + debug_with_source_map(span, f, source_map) } else { f.debug_struct("Span") .field("lo", &span.lo()) diff --git a/src/test/ui/proc-macro/debug/dump-debug-span-debug.stderr b/src/test/ui/proc-macro/debug/dump-debug-span-debug.stderr index 163a2c9f44cad..2c05bdbc492a4 100644 --- a/src/test/ui/proc-macro/debug/dump-debug-span-debug.stderr +++ b/src/test/ui/proc-macro/debug/dump-debug-span-debug.stderr @@ -1,166 +1,166 @@ -TokenStream [Ident { ident: "ident", span: $DIR/dump-debug-span-debug.rs:9:5: 9:10 }, Ident { ident: "r#ident", span: $DIR/dump-debug-span-debug.rs:10:5: 10:12 }, Punct { ch: ',', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:11:5: 11:6 }, Punct { ch: '=', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 }, Punct { ch: '=', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 }, Punct { ch: '>', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:12:7: 12:8 }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/dump-debug-span-debug.rs:13:5: 13:7 }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: $DIR/dump-debug-span-debug.rs:14:6: 14:7 }], span: $DIR/dump-debug-span-debug.rs:14:5: 14:8 }, Literal { kind: Integer, symbol: "0", suffix: None, span: $DIR/dump-debug-span-debug.rs:17:5: 17:6 }, Literal { kind: Float, symbol: "1.0", suffix: None, span: $DIR/dump-debug-span-debug.rs:18:5: 18:8 }, Literal { kind: Str, symbol: "S", suffix: None, span: $DIR/dump-debug-span-debug.rs:19:5: 19:8 }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:20:5: 20:9 }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:21:5: 21:9 }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:22:5: 22:13 }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:23:5: 23:11 }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:24:5: 24:15 }, Literal { kind: Char, symbol: "C", suffix: None, span: $DIR/dump-debug-span-debug.rs:25:5: 25:8 }, Literal { kind: Byte, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:26:5: 26:9 }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:29:5: 29:7 }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:30:5: 30:9 }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:31:5: 31:9 }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:32:5: 32:10 }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:33:5: 33:10 }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:34:5: 34:14 }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:35:5: 35:12 }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:36:5: 36:16 }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:37:5: 37:9 }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:38:5: 38:10 }] +TokenStream [Ident { ident: "ident", span: $DIR/dump-debug-span-debug.rs:9:5: 9:10 (#0) }, Ident { ident: "r#ident", span: $DIR/dump-debug-span-debug.rs:10:5: 10:12 (#0) }, Punct { ch: ',', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:11:5: 11:6 (#0) }, Punct { ch: '=', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 (#0) }, Punct { ch: '=', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 (#0) }, Punct { ch: '>', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:12:7: 12:8 (#0) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/dump-debug-span-debug.rs:13:5: 13:7 (#0) }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: $DIR/dump-debug-span-debug.rs:14:6: 14:7 (#0) }], span: $DIR/dump-debug-span-debug.rs:14:5: 14:8 (#0) }, Literal { kind: Integer, symbol: "0", suffix: None, span: $DIR/dump-debug-span-debug.rs:17:5: 17:6 (#0) }, Literal { kind: Float, symbol: "1.0", suffix: None, span: $DIR/dump-debug-span-debug.rs:18:5: 18:8 (#0) }, Literal { kind: Str, symbol: "S", suffix: None, span: $DIR/dump-debug-span-debug.rs:19:5: 19:8 (#0) }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:20:5: 20:9 (#0) }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:21:5: 21:9 (#0) }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:22:5: 22:13 (#0) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:23:5: 23:11 (#0) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:24:5: 24:15 (#0) }, Literal { kind: Char, symbol: "C", suffix: None, span: $DIR/dump-debug-span-debug.rs:25:5: 25:8 (#0) }, Literal { kind: Byte, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:26:5: 26:9 (#0) }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:29:5: 29:7 (#0) }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:30:5: 30:9 (#0) }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:31:5: 31:9 (#0) }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:32:5: 32:10 (#0) }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:33:5: 33:10 (#0) }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:34:5: 34:14 (#0) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:35:5: 35:12 (#0) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:36:5: 36:16 (#0) }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:37:5: 37:9 (#0) }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:38:5: 38:10 (#0) }] TokenStream [ Ident { ident: "ident", - span: $DIR/dump-debug-span-debug.rs:9:5: 9:10, + span: $DIR/dump-debug-span-debug.rs:9:5: 9:10 (#0), }, Ident { ident: "r#ident", - span: $DIR/dump-debug-span-debug.rs:10:5: 10:12, + span: $DIR/dump-debug-span-debug.rs:10:5: 10:12 (#0), }, Punct { ch: ',', spacing: Alone, - span: $DIR/dump-debug-span-debug.rs:11:5: 11:6, + span: $DIR/dump-debug-span-debug.rs:11:5: 11:6 (#0), }, Punct { ch: '=', spacing: Joint, - span: $DIR/dump-debug-span-debug.rs:12:5: 12:7, + span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 (#0), }, Punct { ch: '=', spacing: Joint, - span: $DIR/dump-debug-span-debug.rs:12:5: 12:7, + span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 (#0), }, Punct { ch: '>', spacing: Alone, - span: $DIR/dump-debug-span-debug.rs:12:7: 12:8, + span: $DIR/dump-debug-span-debug.rs:12:7: 12:8 (#0), }, Group { delimiter: Parenthesis, stream: TokenStream [], - span: $DIR/dump-debug-span-debug.rs:13:5: 13:7, + span: $DIR/dump-debug-span-debug.rs:13:5: 13:7 (#0), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "_", - span: $DIR/dump-debug-span-debug.rs:14:6: 14:7, + span: $DIR/dump-debug-span-debug.rs:14:6: 14:7 (#0), }, ], - span: $DIR/dump-debug-span-debug.rs:14:5: 14:8, + span: $DIR/dump-debug-span-debug.rs:14:5: 14:8 (#0), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: $DIR/dump-debug-span-debug.rs:17:5: 17:6, + span: $DIR/dump-debug-span-debug.rs:17:5: 17:6 (#0), }, Literal { kind: Float, symbol: "1.0", suffix: None, - span: $DIR/dump-debug-span-debug.rs:18:5: 18:8, + span: $DIR/dump-debug-span-debug.rs:18:5: 18:8 (#0), }, Literal { kind: Str, symbol: "S", suffix: None, - span: $DIR/dump-debug-span-debug.rs:19:5: 19:8, + span: $DIR/dump-debug-span-debug.rs:19:5: 19:8 (#0), }, Literal { kind: ByteStr, symbol: "B", suffix: None, - span: $DIR/dump-debug-span-debug.rs:20:5: 20:9, + span: $DIR/dump-debug-span-debug.rs:20:5: 20:9 (#0), }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, - span: $DIR/dump-debug-span-debug.rs:21:5: 21:9, + span: $DIR/dump-debug-span-debug.rs:21:5: 21:9 (#0), }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, - span: $DIR/dump-debug-span-debug.rs:22:5: 22:13, + span: $DIR/dump-debug-span-debug.rs:22:5: 22:13 (#0), }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, - span: $DIR/dump-debug-span-debug.rs:23:5: 23:11, + span: $DIR/dump-debug-span-debug.rs:23:5: 23:11 (#0), }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, - span: $DIR/dump-debug-span-debug.rs:24:5: 24:15, + span: $DIR/dump-debug-span-debug.rs:24:5: 24:15 (#0), }, Literal { kind: Char, symbol: "C", suffix: None, - span: $DIR/dump-debug-span-debug.rs:25:5: 25:8, + span: $DIR/dump-debug-span-debug.rs:25:5: 25:8 (#0), }, Literal { kind: Byte, symbol: "B", suffix: None, - span: $DIR/dump-debug-span-debug.rs:26:5: 26:9, + span: $DIR/dump-debug-span-debug.rs:26:5: 26:9 (#0), }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:29:5: 29:7, + span: $DIR/dump-debug-span-debug.rs:29:5: 29:7 (#0), }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:30:5: 30:9, + span: $DIR/dump-debug-span-debug.rs:30:5: 30:9 (#0), }, Literal { kind: Str, symbol: "S", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:31:5: 31:9, + span: $DIR/dump-debug-span-debug.rs:31:5: 31:9 (#0), }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:32:5: 32:10, + span: $DIR/dump-debug-span-debug.rs:32:5: 32:10 (#0), }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:33:5: 33:10, + span: $DIR/dump-debug-span-debug.rs:33:5: 33:10 (#0), }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:34:5: 34:14, + span: $DIR/dump-debug-span-debug.rs:34:5: 34:14 (#0), }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:35:5: 35:12, + span: $DIR/dump-debug-span-debug.rs:35:5: 35:12 (#0), }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:36:5: 36:16, + span: $DIR/dump-debug-span-debug.rs:36:5: 36:16 (#0), }, Literal { kind: Char, symbol: "C", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:37:5: 37:9, + span: $DIR/dump-debug-span-debug.rs:37:5: 37:9 (#0), }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), - span: $DIR/dump-debug-span-debug.rs:38:5: 38:10, + span: $DIR/dump-debug-span-debug.rs:38:5: 38:10 (#0), }, ]