diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-11-11 20:51:41 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-11 20:51:41 +0530 |
| commit | 6026785b7a78abbf2f262b575d5dd0bbc65786e2 (patch) | |
| tree | 952dc21b01764c1b21daae6cf2b1105f8118101d /compiler/rustc_interface/src/errors.rs | |
| parent | e83b4765c32b783dc7485a9f80ccb47ba893a7dd (diff) | |
| parent | bd3c4fb2f6accf64c23ac3aff9e4e96506e2f7b1 (diff) | |
| download | rust-6026785b7a78abbf2f262b575d5dd0bbc65786e2.tar.gz rust-6026785b7a78abbf2f262b575d5dd0bbc65786e2.zip | |
Rollup merge of #104217 - Nilstrieb:funny-dollar-syntax, r=TaKO8Ki
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
```
fixes #103539
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
