Skip to content

Commit 6c4fc85

Browse files
committed
Update rustdoc to new slug style
1 parent cc6cff5 commit 6c4fc85

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

compiler/rustc_macros/src/diagnostics/mod.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ use synstructure::Structure;
3838
/// ```
3939
///
4040
/// ```fluent
41-
/// move-out-of-borrow = cannot move out of {$name} because it is borrowed
41+
/// move_out_of_borrow = cannot move out of {$name} because it is borrowed
4242
/// .label = cannot move out of borrow
43-
/// .first-borrow-label = `{$ty}` first borrowed here
43+
/// .first_borrow_label = `{$ty}` first borrowed here
4444
/// .suggestion = consider cloning here
4545
/// ```
4646
///
@@ -84,9 +84,9 @@ pub fn session_diagnostic_derive(s: Structure<'_>) -> TokenStream {
8484
/// ```
8585
///
8686
/// ```fluent
87-
/// lint-atomic-ordering-invalid-fail-success = `{$method}`'s success ordering must be at least as strong as its failure ordering
88-
/// .fail-label = `{$fail_ordering}` failure ordering
89-
/// .success-label = `{$success_ordering}` success ordering
87+
/// lint_atomic_ordering_invalid_fail_success = `{$method}`'s success ordering must be at least as strong as its failure ordering
88+
/// .fail_label = `{$fail_ordering}` failure ordering
89+
/// .success_label = `{$success_ordering}` success ordering
9090
/// .suggestion = consider using `{$success_suggestion}` success ordering instead
9191
/// ```
9292
///
@@ -140,11 +140,11 @@ pub fn lint_diagnostic_derive(s: Structure<'_>) -> TokenStream {
140140
/// ```
141141
///
142142
/// ```fluent
143-
/// parser-expected-identifier = expected identifier
143+
/// parser_expected_identifier = expected identifier
144144
///
145-
/// parser-expected-identifier-found = expected identifier, found {$found}
145+
/// parser_expected_identifier-found = expected identifier, found {$found}
146146
///
147-
/// parser-raw-identifier = escape `{$ident}` to use it as an identifier
147+
/// parser_raw_identifier = escape `{$ident}` to use it as an identifier
148148
/// ```
149149
///
150150
/// Then, later, to add the subdiagnostic:

compiler/rustc_macros/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ pub fn newtype_index(input: TokenStream) -> TokenStream {
6565
/// ..where `typeck.ftl` has the following contents..
6666
///
6767
/// ```fluent
68-
/// typeck-field-multiply-specified-in-initializer =
68+
/// typeck_field_multiply_specified_in_initializer =
6969
/// field `{$ident}` specified more than once
7070
/// .label = used more than once
71-
/// .label-previous-use = first use of `{$ident}`
71+
/// .label_previous_use = first use of `{$ident}`
7272
/// ```
7373
/// ...then the macro parse the Fluent resource, emitting a diagnostic if it fails to do so, and
7474
/// will generate the following code:
@@ -81,11 +81,11 @@ pub fn newtype_index(input: TokenStream) -> TokenStream {
8181
/// mod fluent_generated {
8282
/// mod typeck {
8383
/// pub const field_multiply_specified_in_initializer: DiagnosticMessage =
84-
/// DiagnosticMessage::fluent("typeck-field-multiply-specified-in-initializer");
84+
/// DiagnosticMessage::fluent("typeck_field_multiply_specified_in_initializer");
8585
/// pub const field_multiply_specified_in_initializer_label_previous_use: DiagnosticMessage =
8686
/// DiagnosticMessage::fluent_attr(
87-
/// "typeck-field-multiply-specified-in-initializer",
88-
/// "previous-use-label"
87+
/// "typeck_field_multiply_specified_in_initializer",
88+
/// "previous_use_label"
8989
/// );
9090
/// }
9191
/// }

0 commit comments

Comments
 (0)