From ec3b711a4bcc8cb3af34b2cdf1ad110eef5981f9 Mon Sep 17 00:00:00 2001 From: 5225225 <5225225@mailbox.org> Date: Thu, 27 Jan 2022 22:22:33 +0000 Subject: Write UI tests, tweak message --- compiler/rustc_parse/src/parser/expr.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_parse/src/parser') 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", -- cgit 1.4.1-3-g733a5