UPDATE - rename SessionSubdiagnostic macro to Subdiagnostic
Also renames: - sym::AddSubdiagnostic to sym:: Subdiagnostic - rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic"
This commit is contained in:
parent
a3396b2070
commit
5f91719f75
24 changed files with 130 additions and 128 deletions
|
@ -268,14 +268,14 @@ type FluentId = Cow<'static, str>;
|
|||
/// Translatable messages for subdiagnostics are typically attributes attached to a larger Fluent
|
||||
/// message so messages of this type must be combined with a `DiagnosticMessage` (using
|
||||
/// `DiagnosticMessage::with_subdiagnostic_message`) before rendering. However, subdiagnostics from
|
||||
/// the `SessionSubdiagnostic` derive refer to Fluent identifiers directly.
|
||||
/// the `Subdiagnostic` derive refer to Fluent identifiers directly.
|
||||
#[rustc_diagnostic_item = "SubdiagnosticMessage"]
|
||||
pub enum SubdiagnosticMessage {
|
||||
/// Non-translatable diagnostic message.
|
||||
// FIXME(davidtwco): can a `Cow<'static, str>` be used here?
|
||||
Str(String),
|
||||
/// Identifier of a Fluent message. Instances of this variant are generated by the
|
||||
/// `SessionSubdiagnostic` derive.
|
||||
/// `Subdiagnostic` derive.
|
||||
FluentIdentifier(FluentId),
|
||||
/// Attribute of a Fluent message. Needs to be combined with a Fluent identifier to produce an
|
||||
/// actual translated message. Instances of this variant are generated by the `fluent_messages`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue