-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hint on unknown escape of Unicode quotation marks in string literal #137067
base: master
Are you sure you want to change the base?
Conversation
Fixes rust-lang#128858 I opted not to produce a suggestion, since it's not obvious what the user meant to do.
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
This comment has been minimized.
This comment has been minimized.
closes #128906 |
@jieyouxu @compiler-errors @Dylan-DPC If you've got some spare time, I'd love some input from you too. I will squash at the end. |
error: unknown character escape: `\u{201c}`
--> src/main.rs:2:26
|
2 | dbg!("since when is \“THIS\” not allowed in a string literal");
| ^ unknown character escape
|
= help: \u{201c} is not an ascii quote, but may look like one in some fonts; consider writing it in its escaped form for clarity.
help: if you meant to use a unicode quote; consider using its escaped form for clarity
|
2 - dbg!("since when is \“THIS\” not allowed in a string literal");
2 + dbg!("since when is \u{201c}THIS\” not allowed in a string literal");
|
error: unknown character escape: `\u{201d}`
--> src/main.rs:2:32
|
2 | dbg!("since when is \“THIS\” not allowed in a string literal");
| ^ unknown character escape
|
= help: \u{201d} is not an ascii quote, but may look like one in some fonts; consider writing it in its escaped form for clarity.
help: if you meant to use a unicode quote; consider using its escaped form for clarity
|
2 - dbg!("since when is \“THIS\” not allowed in a string literal");
2 + dbg!("since when is \“THIS\u{201d} not allowed in a string literal");
|
error: could not compile `diag` (bin "diag") due to 2 previous errors In image form: |
Assigning review to Michael because of this comment in the previous version of a patch. |
kinda busy so re-rolling r? compiler |
Fixes #128858
Continuation of #128906