pub fn body_span<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) -> Span
Expand description
This function exists to deal with #[tracing::instrument]
. In that case,
sadly, the Span
value attached to a body directly refers only to the
#[tracing::instrument]
macro call. This function instead reconstitutes the
span from the collection of spans on each statement.