diff options
| author | Patrick McCarter <p.mccarter@gmail.com> | 2019-02-16 20:56:12 -0500 |
|---|---|---|
| committer | Patrick McCarter <p.mccarter@gmail.com> | 2019-02-16 20:56:12 -0500 |
| commit | 71cd4c8e4af4a05991fef5a61110510c78d90131 (patch) | |
| tree | f5edf1e05bf0b3c07a32ff1eb6fd986d2d09960d /src/test | |
| parent | c34aac7b1703edc9ef4ebaa17c16b96a18ca1443 (diff) | |
ui test for directed quote help suggestion #58436
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/parser/unicode-quote-chars.rs | 7 | ||||
| -rw-r--r-- | src/test/ui/parser/unicode-quote-chars.stderr | 12 |
2 files changed, 19 insertions, 0 deletions
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 + |
