File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,8 +124,7 @@ translation.
124124### Messages
125125
126126All of rustc's traditional diagnostic APIs (e.g. ` struct_span_err ` or ` note ` )
127- take any message that can be converted into a ` DiagMessage ` (or
128- ` SubdiagMessage ` ).
127+ take any message that can be converted into a ` DiagMessage ` .
129128
130129[ ` rustc_error_messages::DiagMessage ` ] can represent legacy non-translatable
131130diagnostic messages and translatable messages. Non-translatable messages are
@@ -138,14 +137,7 @@ with an attribute).
138137Fluent resource (described in more detail below), or ` DiagMessage ` s will
139138either be created in the macro-generated code of a diagnostic derive.
140139
141- ` rustc_error_messages::SubdiagMessage ` is similar, it can correspond to a
142- legacy non-translatable diagnostic message or the name of an attribute to a
143- Fluent message. Translatable ` SubdiagMessage ` s must be combined with a
144- ` DiagMessage ` (using ` DiagMessage::with_subdiagnostic_message ` ) to
145- be emitted (an attribute name on its own is meaningless without a corresponding
146- message identifier, which is what ` DiagMessage ` provides).
147-
148- Both ` DiagMessage ` and ` SubdiagMessage ` implement ` Into ` for any
140+ ` DiagMessage ` implements ` Into ` for any
149141type that can be converted into a string, and converts these into
150142non-translatable diagnostics - this keeps all existing diagnostic calls
151143working.
You can’t perform that action at this time.
0 commit comments