Skip to content

Commit 2058333

Browse files
simplify plurals in fluent messages using hir::ConstContext
1 parent f97f2a4 commit 2058333

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

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

+6-22
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ const-eval-thread-local-access =
77
thread-local statics cannot be accessed at compile-time
88
99
const-eval-static-access =
10-
{ $kind ->
11-
[constant function] constant functions
12-
[static] statics
13-
*[constant] constants
14-
} cannot refer to statics
10+
{$kind}s cannot refer to statics
1511
.help = consider extracting the value of the `static` to a `const`, and referring to that
1612
.teach-note = `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable.
1713
.teach-help = To fix this, the value can be extracted to a `const` and then used.
@@ -28,20 +24,8 @@ const-eval-raw-ptr-comparison =
2824
const-eval-panic-non-str = argument to `panic!()` in a const context must have type `&str`
2925
3026
const-eval-mut-deref =
31-
mutation through a reference is not allowed in { $kind ->
32-
[constant function] constant functions
33-
[static] statics
34-
*[constant] constants
35-
}
36-
37-
const-eval-transient-mut-borrow = mutable references are not allowed in { $kind ->
38-
[constant function] constant functions
39-
[static] statics
40-
*[constant] constants
41-
}
42-
43-
const-eval-transient-mut-borrow-raw = raw mutable references are not allowed in { $kind ->
44-
[constant function] constant functions
45-
[static] statics
46-
*[constant] constants
47-
}
27+
mutation through a reference is not allowed in {$kind}s
28+
29+
const-eval-transient-mut-borrow = mutable references are not allowed in {$kind}s
30+
31+
const-eval-transient-mut-borrow-raw = raw mutable references are not allowed in {$kind}s

0 commit comments

Comments
 (0)