diff --git a/src/test/ui/parser/unicode-quote-chars.rs b/src/test/ui/parser/unicode-quote-chars.rs new file mode 100644 index 00000000000..69644211b8a --- /dev/null +++ b/src/test/ui/parser/unicode-quote-chars.rs @@ -0,0 +1,7 @@ +// ignore-tidy-linelength + +fn main() { + println!(“hello world”); + //~^ ERROR unknown start of token: \u{201c} + //~^^ HELP Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '"' (Quotation Mark), but are not +} diff --git a/src/test/ui/parser/unicode-quote-chars.stderr b/src/test/ui/parser/unicode-quote-chars.stderr new file mode 100644 index 00000000000..315e20cf854 --- /dev/null +++ b/src/test/ui/parser/unicode-quote-chars.stderr @@ -0,0 +1,12 @@ +error: unknown start of token: /u{201c} + --> $DIR/unicode-quote-chars.rs:4:14 + | +LL | println!(“hello world”); + | ^ +help: Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '"' (Quotation Mark), but are not + | +LL | println!("hello world"); + | ^^^^^^^^^^^^^ + +error: aborting due to previous error +