about summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2019-07-30 12:33:32 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2019-08-05 13:15:11 +0300
commitb5e35b128efeed4bfdb4b1ee9d0697389ec9f164 (patch)
tree6ef17b7b48b314b6b7aef0e42eb7f17f15d076cf /src/test/ui/parser
parente1d7e4ae82c5500407e606c0b2b595597b9981f3 (diff)
downloadrust-b5e35b128efeed4bfdb4b1ee9d0697389ec9f164.tar.gz
rust-b5e35b128efeed4bfdb4b1ee9d0697389ec9f164.zip
remove special code path for unknown tokens
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/lex-bad-token.rs2
-rw-r--r--src/test/ui/parser/lex-stray-backslash.rs2
-rw-r--r--src/test/ui/parser/unicode-quote-chars.rs3
-rw-r--r--src/test/ui/parser/unicode-quote-chars.stderr18
4 files changed, 24 insertions, 1 deletions
diff --git a/src/test/ui/parser/lex-bad-token.rs b/src/test/ui/parser/lex-bad-token.rs
index feb670c3d3d..9e482461112 100644
--- a/src/test/ui/parser/lex-bad-token.rs
+++ b/src/test/ui/parser/lex-bad-token.rs
@@ -1 +1,3 @@
 ● //~ ERROR: unknown start of token
+
+fn main() {}
diff --git a/src/test/ui/parser/lex-stray-backslash.rs b/src/test/ui/parser/lex-stray-backslash.rs
index 90d359231a6..bb27f44c279 100644
--- a/src/test/ui/parser/lex-stray-backslash.rs
+++ b/src/test/ui/parser/lex-stray-backslash.rs
@@ -1 +1,3 @@
 \ //~ ERROR: unknown start of token: \
+
+fn main() {}
diff --git a/src/test/ui/parser/unicode-quote-chars.rs b/src/test/ui/parser/unicode-quote-chars.rs
index 69644211b8a..1812dad81af 100644
--- a/src/test/ui/parser/unicode-quote-chars.rs
+++ b/src/test/ui/parser/unicode-quote-chars.rs
@@ -4,4 +4,7 @@ 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
+    //~^^^ ERROR unknown start of token: \u{201d}
+    //~^^^^ HELP Unicode character '”' (Right Double Quotation Mark) looks like '"' (Quotation Mark), but it is not
+    //~^^^^^ ERROR expected token: `,`
 }
diff --git a/src/test/ui/parser/unicode-quote-chars.stderr b/src/test/ui/parser/unicode-quote-chars.stderr
index 4a09ed75605..84e45ecd873 100644
--- a/src/test/ui/parser/unicode-quote-chars.stderr
+++ b/src/test/ui/parser/unicode-quote-chars.stderr
@@ -8,5 +8,21 @@ help: Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Dou
 LL |     println!("hello world");
    |              ^^^^^^^^^^^^^
 
-error: aborting due to previous error
+error: unknown start of token: \u{201d}
+  --> $DIR/unicode-quote-chars.rs:4:26
+   |
+LL |     println!(“hello world”);
+   |                          ^
+help: Unicode character '”' (Right Double Quotation Mark) looks like '"' (Quotation Mark), but it is not
+   |
+LL |     println!(“hello world");
+   |                          ^
+
+error: expected token: `,`
+  --> $DIR/unicode-quote-chars.rs:4:21
+   |
+LL |     println!(“hello world”);
+   |                     ^^^^^ expected `,`
+
+error: aborting due to 3 previous errors