A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/enum.DiagMessage.html below:

DiagMessage in rustc_errors - Rust

pub enum DiagMessage {
    Str(Cow<'static, str>),
    Translated(Cow<'static, str>),
    FluentIdentifier(Cow<'static, str>, Option<Cow<'static, str>>),
}
Expand description

Abstraction over a message in a diagnostic to support both translatable and non-translatable diagnostic messages.

Intended to be removed once diagnostics are entirely translatable.

§

Non-translatable diagnostic message.

§

Translatable message which has been already translated.

Some diagnostics have repeated subdiagnostics where the same interpolated variables would be instantiated multiple times with different values. These subdiagnostics’ messages are translated when they are added to the parent diagnostic, producing this variant of DiagMessage.

§ Source§ Source

Given a SubdiagMessage which may contain a Fluent attribute, create a new DiagMessage that combines that attribute with the Fluent identifier of self.

Source Source§ Source§ Source§ Source§ Source§ Source§

Converts to this type from the input type.

Source§ Source§

Converts to this type from the input type.

Source§

Translating into a subdiagnostic message from a diagnostic message is a little strange - but the subdiagnostic functions (e.g. span_label) take a SubdiagMessage and the subdiagnostic derive refers to typed identifiers that are DiagMessages, so need to be able to convert between these, as much as they’ll be converted back into DiagMessage using with_subdiagnostic_message eventually. Don’t use this other than for the derive.

Source§

Converts to this type from the input type.

Source§ Source§

Converts to this type from the input type.

Source§ Source§ Source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · Source§

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Source§ Source§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 48 bytes

Size for each variant:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4