Skip to content

Commit cc6cff5

Browse files
committed
Replace - with _ in ftl slugs for better grepability
Having to replace - with _ (and vice versa) makes the slugs less greppable and thus constitutes a contributor roadblock. Result of running this repeatedly up until reaching a fixpoint: find compiler/rustc_error_messages/locales/en-US/ -type f -exec sed -i 's/\(.+\)-\(.*\)=/\1_\2=/' {} \; Plus some fixes to update usages of slugs leading with -.
1 parent f22819b commit cc6cff5

File tree

9 files changed

+358
-358
lines changed

9 files changed

+358
-358
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
borrowck-move-unsized =
1+
borrowck_move_unsized =
22
cannot move a value of type `{$ty}`
33
.label = the size of `{$ty}` cannot be statically determined
44
5-
borrowck-higher-ranked-lifetime-error =
5+
borrowck_higher_ranked_lifetime_error =
66
higher-ranked lifetime error
77
8-
borrowck-could-not-prove =
8+
borrowck_could_not_prove =
99
could not prove `{$predicate}`
1010
11-
borrowck-could-not-normalize =
11+
borrowck_could_not_normalize =
1212
could not normalize `{$value}`
1313
14-
borrowck-higher-ranked-subtype-error =
14+
borrowck_higher_ranked_subtype_error =
1515
higher-ranked subtype error
1616
17-
generic-does-not-live-long-enough =
17+
generic_does_not_live_long_enough =
1818
`{$kind}` does not live long enough
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
builtin-macros-requires-cfg-pattern =
1+
builtin_macros_requires_cfg_pattern =
22
macro requires a cfg-pattern as an argument
33
.label = cfg-pattern required
44
5-
builtin-macros-expected-one-cfg-pattern = expected 1 cfg-pattern
5+
builtin_macros_expected_one_cfg_pattern = expected 1 cfg-pattern
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
const-eval-unstable-in-stable =
1+
const_eval_unstable_in_stable =
22
const-stable function cannot use `#[feature({$gate})]`
3-
.unstable-sugg = if it is not part of the public API, make this function unstably const
4-
.bypass-sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks
3+
.unstable_sugg = if it is not part of the public API, make this function unstably const
4+
.bypass_sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks
55
6-
const-eval-thread-local-access =
6+
const_eval_thread_local_access =
77
thread-local statics cannot be accessed at compile-time
88
9-
const-eval-static-access =
9+
const_eval_static_access =
1010
{$kind}s cannot refer to statics
1111
.help = consider extracting the value of the `static` to a `const`, and referring to that
12-
.teach-note = `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable.
13-
.teach-help = To fix this, the value can be extracted to a `const` and then used.
12+
.teach_note = `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable.
13+
.teach_help = To fix this, the value can be extracted to a `const` and then used.
1414
15-
const-eval-raw-ptr-to-int =
15+
const_eval_raw_ptr_to_int =
1616
pointers cannot be cast to integers during const eval
1717
.note = at compile-time, pointers do not have an integer value
1818
.note2 = avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
1919
20-
const-eval-raw-ptr-comparison =
20+
const_eval_raw_ptr_comparison =
2121
pointers cannot be reliably compared during const eval
2222
.note = see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
2323
24-
const-eval-panic-non-str = argument to `panic!()` in a const context must have type `&str`
24+
const_eval_panic_non_str = argument to `panic!()` in a const context must have type `&str`
2525
26-
const-eval-mut-deref =
26+
const_eval_mut_deref =
2727
mutation through a reference is not allowed in {$kind}s
2828
29-
const-eval-transient-mut-borrow = mutable references are not allowed in {$kind}s
29+
const_eval_transient_mut_borrow = mutable references are not allowed in {$kind}s
3030
31-
const-eval-transient-mut-borrow-raw = raw mutable references are not allowed in {$kind}s
31+
const_eval_transient_mut_borrow_raw = raw mutable references are not allowed in {$kind}s
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
expand-explain-doc-comment-outer =
1+
expand_explain_doc_comment_outer =
22
outer doc comments expand to `#[doc = "..."]`, which is what this macro attempted to match
33
4-
expand-explain-doc-comment-inner =
4+
expand_explain_doc_comment_inner =
55
inner doc comments expand to `#![doc = "..."]`, which is what this macro attempted to match

compiler/rustc_error_messages/locales/en-US/lint.ftl

+163-163
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
parser-struct-literal-body-without-path =
1+
parser_struct_literal_body_without_path =
22
struct literal body without path
33
.suggestion = you might have forgotten to add the struct literal inside the block
44
5-
parser-maybe-report-ambiguous-plus =
5+
parser_maybe_report_ambiguous_plus =
66
ambiguous `+` in a type
77
.suggestion = use parentheses to disambiguate
88
9-
parser-maybe-recover-from-bad-type-plus =
9+
parser_maybe_recover_from_bad_type_plus =
1010
expected a path on the left-hand side of `+`, not `{$ty}`
1111
12-
parser-add-paren = try adding parentheses
12+
parser_add_paren = try adding parentheses
1313
14-
parser-forgot-paren = perhaps you forgot parentheses?
14+
parser_forgot_paren = perhaps you forgot parentheses?
1515
16-
parser-expect-path = expected a path
16+
parser_expect_path = expected a path
1717
18-
parser-maybe-recover-from-bad-qpath-stage-2 =
18+
parser_maybe_recover_from_bad_qpath_stage_2 =
1919
missing angle brackets in associated item path
2020
.suggestion = try: `{$ty}`
2121
22-
parser-incorrect-semicolon =
22+
parser_incorrect_semicolon =
2323
expected item, found `;`
2424
.suggestion = remove this semicolon
2525
.help = {$name} declarations are not followed by a semicolon
2626
27-
parser-incorrect-use-of-await =
27+
parser_incorrect_use_of_await =
2828
incorrect use of `await`
29-
.parentheses-suggestion = `await` is not a method call, remove the parentheses
30-
.postfix-suggestion = `await` is a postfix operation
29+
.parentheses_suggestion = `await` is not a method call, remove the parentheses
30+
.postfix_suggestion = `await` is a postfix operation
3131
32-
parser-in-in-typo =
32+
parser_in_in_typo =
3333
expected iterable, found keyword `in`
3434
.suggestion = remove the duplicated `in`

0 commit comments

Comments
 (0)