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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.