@@ -13,10 +13,7 @@ active redesign proposals (as of
1313Please see the tracking issue < https://github.com/rust-lang/rust/issues/132181 >
1414for status updates.
1515
16- We have downgraded the internal lints ` untranslatable_diagnostic ` and
17- ` diagnostic_outside_of_impl ` . Those internal lints previously required new code
18- to use the current translation infrastructure. However, because the translation
19- infra is waiting for a yet-to-be-proposed redesign and thus rework, we are not
16+ The translation infra is waiting for a yet-to-be-proposed redesign and thus rework, we are not
2017mandating usage of current translation infra. Use the infra if you * want to* or
2118otherwise makes the code cleaner, but otherwise sidestep the translation infra
2219if you need more flexibility.
@@ -40,11 +37,6 @@ There are two ways of writing translatable diagnostics:
4037When adding or changing a translatable diagnostic,
4138you don't need to worry about the translations.
4239Only updating the original English message is required.
43- Currently,
44- each crate which defines translatable diagnostics has its own Fluent resource,
45- which is a file named ` messages.ftl ` ,
46- located in the root of the crate
47- (such as` compiler/rustc_expand/messages.ftl ` ).
4840
4941## Fluent
5042
@@ -118,11 +110,8 @@ information that needs to be provided by the code to do so.
118110
119111### Compile-time validation and typed identifiers
120112
121- rustc's ` fluent_messages ` macro performs compile-time validation of Fluent
122- resources and generates code to make it easier to refer to Fluent messages in
123- diagnostics.
124-
125- Compile-time validation of Fluent resources will emit any parsing errors
113+ rustc's ` #[derive(Diagnostic)] ` macro performs compile-time validation of Fluent
114+ messages. Compile-time validation of Fluent resources will emit any parsing errors
126115from Fluent resources while building the compiler, preventing invalid Fluent
127116resources from causing panics in the compiler. Compile-time validation also
128117emits an error if multiple Fluent messages have the same identifier.
0 commit comments