1
Fork 0
rust/compiler/rustc_error_messages
Nilstrieb bd3c4fb2f6
Display help message when fluent arg was referenced incorrectly
The fluent argument syntax is a little special and easy to get wrong, so
we emit a small help message when someone gets it wrong.

Example:
```
parser_mismatched_closing_delimiter = mismatched closing delimiter: `${delimiter}`
```
panics with
```
thread 'rustc' panicked at 'Encountered errors while formatting message for `parser_mismatched_closing_delimiter`
help: Argument `delimiter` exists but was not referenced correctly. Try using `{$delimiter}` instead
attr: `None`
args: `FluentArgs([("delimiter", String("}"))])`
errors: `[ResolverError(Reference(Message { id: "delimiter", attribute: None }))]`', compiler/rustc_errors/src/translation.rs:123:21
```
2022-11-09 22:38:10 +01:00
..
locales/en-US Rollup merge of #103559 - AndyJado:var_span_label, r=davidtwco 2022-11-08 21:03:53 -05:00
src Display help message when fluent arg was referenced incorrectly 2022-11-09 22:38:10 +01:00
Cargo.toml Remove from compiler/ crates 2022-09-29 16:49:04 +09:00