Skip to content

Commit e57f119

Browse files
committed
Auto merge of #152437 - JonathanBrouwer:rollup-bWpnWOz, r=JonathanBrouwer
Rollup of 10 pull requests Successful merges: - rust-lang/rust#152364 (Port a lot of attributes to the new parser) - rust-lang/rust#151954 (Add help message suggesting explicit reference cast for From/TryFrom) - rust-lang/rust#152148 (Move `impl Interner for TyCtxt` to its own submodule) - rust-lang/rust#152226 (Modernize diagnostic for indeterminate trait object lifetime bounds) - rust-lang/rust#152351 (Remove `SubdiagMessage` in favour of the identical `DiagMessage`) - rust-lang/rust#152417 (Move the needs-drop check for `arena_cache` queries out of macro code) - rust-lang/rust#150688 (typeck: Make it clearer that `check_pat_lit` only handles literal patterns) - rust-lang/rust#152293 (Format heterogeneous try blocks) - rust-lang/rust#152355 (Update documentation of rustc_macros) - rust-lang/rust#152396 (Uplift `Predicate::allow_normalization` to `rustc_type_ir`)
2 parents 756425f + 711a547 commit e57f119

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/diagnostics/translation.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ translation.
135135
### Messages
136136

137137
All 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
142141
diagnostic messages and translatable messages. Non-translatable messages are
@@ -149,14 +148,7 @@ with an attribute).
149148
Fluent resource (described in more detail below), or `DiagMessage`s will
150149
either 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
160152
type that can be converted into a string, and converts these into
161153
non-translatable diagnostics - this keeps all existing diagnostic calls
162154
working.

0 commit comments

Comments
 (0)