Skip to content

Commit 807ffe6

Browse files
authored
Merge pull request #2777 from rust-lang/rustc-pull
Rustc pull update
2 parents 1a02979 + e33795a commit 807ffe6

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
44e34e1ac6d7e69b40856cf1403d3da145319c30
1+
139651428df86cf88443295542c12ea617cbb587

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)