Calls the provided closure, using the provided
SourceMap to format
any spans that are debug-printed during the closure’s execution.
Normally, the global
TyCtxt is used to retrieve the
rustc_interface::callbacks::span_debug1). However, some parts
of the compiler (e.g.
rustc_parse) may debug-print
TyCtxt is available. In this case, we fall back to
SourceMap provided to this function. If that is not available,
we fall back to printing the raw
Span field values.