From 9ad0dbab5b134592141efdcc93d37ea6a65e425f Mon Sep 17 00:00:00 2001 From: Andy Russell Date: Sat, 20 May 2017 11:18:26 -0400 Subject: [PATCH] remove "much" from unicode diagnostic --- src/libsyntax/parse/lexer/unicode_chars.rs | 2 +- src/test/parse-fail/unicode-chars.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libsyntax/parse/lexer/unicode_chars.rs b/src/libsyntax/parse/lexer/unicode_chars.rs index 4df23da3c9ce3..83a164bdb9693 100644 --- a/src/libsyntax/parse/lexer/unicode_chars.rs +++ b/src/libsyntax/parse/lexer/unicode_chars.rs @@ -238,7 +238,7 @@ pub fn check_for_substitution<'a>(reader: &StringReader<'a>, match ASCII_ARRAY.iter().find(|&&(c, _)| c == ascii_char) { Some(&(ascii_char, ascii_name)) => { let msg = - format!("unicode character '{}' ({}) looks much like '{}' ({}), but it's not", + format!("unicode character '{}' ({}) looks like '{}' ({}), but it's not", ch, u_name, ascii_char, ascii_name); err.span_help(span, &msg); }, diff --git a/src/test/parse-fail/unicode-chars.rs b/src/test/parse-fail/unicode-chars.rs index adfaf62b5d3cc..1bdeb121a55d5 100644 --- a/src/test/parse-fail/unicode-chars.rs +++ b/src/test/parse-fail/unicode-chars.rs @@ -9,10 +9,9 @@ // except according to those terms. // compile-flags: -Z parse-only -// ignore-tidy-linelength fn main() { let y = 0; //~^ ERROR unknown start of token: \u{37e} - //~^^ HELP unicode character ';' (Greek Question Mark) looks much like ';' (Semicolon), but it's not + //~^^ HELP unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it's not }