rustc_mir_transform::coverage::unexpand

# Function unexpand_into_body_span_with_expn_kind

source

    pub(crate) fn unexpand_into_body_span_with_expn_kind(
        original_span: Span,
        body_span: Span,
    ) -> Option<(Span, Option<ExpnKind>)>

Expand description

Walks through the expansion ancestors of `original_span` to find a span that is contained in `body_span` and has the same [syntax context] as `body_span`.

If the returned span represents a bang-macro invocation (e.g. `foo!(..)`), the returned symbol will be the name of that macro (e.g. `foo`).