Skip to content

Commit

Permalink
simplify plurals in fluent messages using hir::ConstContext
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jul 8, 2022
1 parent f97f2a4 commit 2058333
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions compiler/rustc_error_messages/locales/en-US/const_eval.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ const-eval-thread-local-access =
thread-local statics cannot be accessed at compile-time
const-eval-static-access =
{ $kind ->
[constant function] constant functions
[static] statics
*[constant] constants
} cannot refer to statics
{$kind}s cannot refer to statics
.help = consider extracting the value of the `static` to a `const`, and referring to that
.teach-note = `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable.
.teach-help = To fix this, the value can be extracted to a `const` and then used.
Expand All @@ -28,20 +24,8 @@ const-eval-raw-ptr-comparison =
const-eval-panic-non-str = argument to `panic!()` in a const context must have type `&str`
const-eval-mut-deref =
mutation through a reference is not allowed in { $kind ->
[constant function] constant functions
[static] statics
*[constant] constants
}
const-eval-transient-mut-borrow = mutable references are not allowed in { $kind ->
[constant function] constant functions
[static] statics
*[constant] constants
}
const-eval-transient-mut-borrow-raw = raw mutable references are not allowed in { $kind ->
[constant function] constant functions
[static] statics
*[constant] constants
}
mutation through a reference is not allowed in {$kind}s
const-eval-transient-mut-borrow = mutable references are not allowed in {$kind}s
const-eval-transient-mut-borrow-raw = raw mutable references are not allowed in {$kind}s

0 comments on commit 2058333

Please sign in to comment.