Skip to content

Commit e33795a

Browse files
author
The rustc-josh-sync Cronjob Bot
committed
Merge ref '139651428df8' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@1396514 Filtered ref: 30addec Upstream diff: rust-lang/rust@44e34e1...1396514 This merge was created using https://github.com/rust-lang/josh-sync.
2 parents 47dcaf9 + 30addec commit e33795a

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

src/diagnostics/translation.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ translation.
124124
### Messages
125125

126126
All 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
131130
diagnostic messages and translatable messages. Non-translatable messages are
@@ -138,14 +137,7 @@ with an attribute).
138137
Fluent resource (described in more detail below), or `DiagMessage`s will
139138
either 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
149141
type that can be converted into a string, and converts these into
150142
non-translatable diagnostics - this keeps all existing diagnostic calls
151143
working.

0 commit comments

Comments
 (0)