diff options
| author | David Tolnay <dtolnay@gmail.com> | 2023-01-14 11:02:14 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2023-01-14 11:04:36 -0800 |
| commit | 39edcfa84e7e715d6ac78f3dfdadfb1046d31b56 (patch) | |
| tree | 9ccbb4bad12631ab964991aa4e3dff88ef0322d8 | |
| parent | 4b51adf6ffa1ae2286ea436eb48cbaa8771886e6 (diff) | |
| download | rust-39edcfa84e7e715d6ac78f3dfdadfb1046d31b56.tar.gz rust-39edcfa84e7e715d6ac78f3dfdadfb1046d31b56.zip | |
Add more nbsp to unicode-chars test
| -rw-r--r-- | tests/ui/parser/unicode-chars.rs | 8 | ||||
| -rw-r--r-- | tests/ui/parser/unicode-chars.stderr | 39 |
2 files changed, 43 insertions, 4 deletions
diff --git a/tests/ui/parser/unicode-chars.rs b/tests/ui/parser/unicode-chars.rs index ba35e95c82a..b9892056321 100644 --- a/tests/ui/parser/unicode-chars.rs +++ b/tests/ui/parser/unicode-chars.rs @@ -2,8 +2,14 @@ fn main() { let y = 0; //~^ ERROR unknown start of token: \u{37e} //~^^ HELP Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not - let x = 0; + let x = 0; //~^ ERROR unknown start of token: \u{a0} //~^^ NOTE character appears 3 more times //~^^^ HELP Unicode character ' ' (No-Break Space) looks like ' ' (Space), but it is not + //~^^^^ ERROR unknown start of token: \u{a0} + //~^^^^^ HELP Unicode character ' ' (No-Break Space) looks like ' ' (Space), but it is not + //~^^^^^^ ERROR unknown start of token: \u{a0} + //~^^^^^^^ HELP Unicode character ' ' (No-Break Space) looks like ' ' (Space), but it is not + //~^^^^^^^^ ERROR unknown start of token: \u{a0} + //~^^^^^^^^^ HELP Unicode character ' ' (No-Break Space) looks like ' ' (Space), but it is not } diff --git a/tests/ui/parser/unicode-chars.stderr b/tests/ui/parser/unicode-chars.stderr index 6a5b27872e7..93ac5ec14be 100644 --- a/tests/ui/parser/unicode-chars.stderr +++ b/tests/ui/parser/unicode-chars.stderr @@ -12,14 +12,47 @@ LL | let y = 0; error: unknown start of token: \u{a0} --> $DIR/unicode-chars.rs:5:5 | -LL | let x = 0; +LL | let x = 0; | ^^^^ | = note: character appears 3 more times help: Unicode character ' ' (No-Break Space) looks like ' ' (Space), but it is not | -LL | let x = 0; +LL | let x = 0; | ++++ -error: aborting due to 2 previous errors +error: unknown start of token: \u{a0} + --> $DIR/unicode-chars.rs:5:12 + | +LL | let x = 0; + | ^ + | +help: Unicode character ' ' (No-Break Space) looks like ' ' (Space), but it is not + | +LL | let x = 0; + | + + +error: unknown start of token: \u{a0} + --> $DIR/unicode-chars.rs:5:14 + | +LL | let x = 0; + | ^ + | +help: Unicode character ' ' (No-Break Space) looks like ' ' (Space), but it is not + | +LL | let x = 0; + | + + +error: unknown start of token: \u{a0} + --> $DIR/unicode-chars.rs:5:16 + | +LL | let x = 0; + | ^ + | +help: Unicode character ' ' (No-Break Space) looks like ' ' (Space), but it is not + | +LL | let x = 0; + | + + +error: aborting due to 5 previous errors |
