File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,8 +135,7 @@ translation.
135135### Messages
136136
137137All of rustc's traditional diagnostic APIs (e.g. ` struct_span_err ` or ` note ` )
138- take any message that can be converted into a ` DiagMessage ` (or
139- ` SubdiagMessage ` ).
138+ take any message that can be converted into a ` DiagMessage ` .
140139
141140[ ` rustc_error_messages::DiagMessage ` ] can represent legacy non-translatable
142141diagnostic messages and translatable messages. Non-translatable messages are
@@ -149,14 +148,7 @@ with an attribute).
149148Fluent resource (described in more detail below), or ` DiagMessage ` s will
150149either be created in the macro-generated code of a diagnostic derive.
151150
152- ` rustc_error_messages::SubdiagMessage ` is similar, it can correspond to a
153- legacy non-translatable diagnostic message or the name of an attribute to a
154- Fluent message. Translatable ` SubdiagMessage ` s must be combined with a
155- ` DiagMessage ` (using ` DiagMessage::with_subdiagnostic_message ` ) to
156- be emitted (an attribute name on its own is meaningless without a corresponding
157- message identifier, which is what ` DiagMessage ` provides).
158-
159- Both ` DiagMessage ` and ` SubdiagMessage ` implement ` Into ` for any
151+ ` DiagMessage ` implements ` Into ` for any
160152type that can be converted into a string, and converts these into
161153non-translatable diagnostics - this keeps all existing diagnostic calls
162154working.
You can’t perform that action at this time.
0 commit comments