diff options
| author | 5225225 <5225225@mailbox.org> | 2022-01-27 22:22:33 +0000 |
|---|---|---|
| committer | 5225225 <5225225@mailbox.org> | 2022-01-31 17:34:10 +0000 |
| commit | ec3b711a4bcc8cb3af34b2cdf1ad110eef5981f9 (patch) | |
| tree | e570fe373c42d6e3f86bfea8ec3548357faa04f7 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 7f2477810271d0e6e0e7025f0629a0213db90795 (diff) | |
| download | rust-ec3b711a4bcc8cb3af34b2cdf1ad110eef5981f9.tar.gz rust-ec3b711a4bcc8cb3af34b2cdf1ad110eef5981f9.zip | |
Write UI tests, tweak message
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 09b88e9e07b..0115d498a7f 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -1738,11 +1738,10 @@ impl<'a> Parser<'a> { .help("valid widths are 8, 16, 32, 64 and 128") .emit(); } else if let Some(fixed) = fix_base_capitalisation(suf) { - let msg = format!("invalid suffix `{}` for number literal", suf); + let msg = "invalid base prefix for number literal"; self.struct_span_err(span, &msg) - .span_label(span, format!("invalid suffix `{}`", suf)) - .help("base prefixes (`0xff`, `0b1010`, `0o755`) are lowercase") + .note("base prefixes (`0xff`, `0b1010`, `0o755`) are lowercase") .span_suggestion( span, "try making the prefix lowercase", |
