Closed
Description
When encountering curly quotes, the compiler now points at the opening one suggesting changing it for a regular straight quote. It should also look ahead looking for a closing curly quote char and suggest changing that one too, because when fixing only the first one, the parser will interpret this as an unclosed string.
fn main() {
println!(“”);
}
error: unknown start of token: \u{201c}
--> src/main.rs:2:14
|
2 | println!(“”);
| ^
help: Unicode character '“' (Left Double Quotation Mark) looks like '"' (Quotation Mark), but it is not
|
2 | println!("”);
| ^
After applying suggestion:
error: unterminated double quote string
--> src/main.rs:2:14
|
2 | println!("”);
| ______________^
3 | | }
| |_^
Ideally
error: unknown start of token: \u{201c}
--> src/main.rs:2:14
|
2 | println!(“”);
| ^-
help: Unicode character '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '"' (Quotation Mark), but it are not
|
2 | println!("");
| ^^