Struct rustc_ap_rustc_span::MultiSpan [−][src]
pub struct MultiSpan { /* fields omitted */ }Expand description
A collection of Spans.
Spans have two orthogonal attributes:
- They can be primary spans. In this case they are the locus of
the error, and would be rendered with
^^^. - They can have a label. In this case, the label is written next to the mark in the snippet when we render.
Implementations
Selects the first primary span (if any).
Returns all primary spans.
Returns true if any of the primary spans are displayable.
Returns true if this contains only a dummy primary span with any hygienic context.
Replaces all occurrences of one Span with another. Used to move Spans in areas that don’t
display well (like std macros). Returns whether replacements occurred.
Returns the strings to highlight. We always ensure that there
is an entry for each of the primary spans – for each primary
span P, if there is at least one label with span P, we return
those labels (marked as primary). But otherwise we return
SpanLabel instances with empty labels.
Returns true if any of the span labels is displayable.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MultiSpanimpl UnwindSafe for MultiSpanBlanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V