remove special code path for unknown tokens

This commit is contained in:
Aleksey Kladov 2019-07-30 12:33:32 +03:00
parent e1d7e4ae82
commit b5e35b128e
5 changed files with 37 additions and 61 deletions

View file

@ -1 +1,3 @@
//~ ERROR: unknown start of token
fn main() {}

View file

@ -1 +1,3 @@
\ //~ ERROR: unknown start of token: \
fn main() {}

View file

@ -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: `,`
}

View file

@ -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