-
Notifications
You must be signed in to change notification settings - Fork 13k
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
When attempting to write str with single quote suggest double quotes #46653
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Multi-character character constant (MCCC) as in C are not supported yet in Rust, so this error message makes sense. To define MCCC we can use a macro. |
| ^^^^ | ||
help: if you meant to write a `str` literal use double quotes instead | ||
| | ||
12 | println!("{", 5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did the }
go?
b27612b
to
668209f
Compare
| | ||
12 | println!('●●'); | ||
| ^^^^ | ||
help: if you meant to write a `str` literal use double quotes instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you meant to write a `str` literal, use double quotes
(comma separating conditional clause and consequent)
ec451e2
to
e6c606f
Compare
How I see the best solution - single-quoted strings are actually lexed and recovered as strings sharing common code with double-quoted strings. |
📌 Commit e6c606f has been approved by |
⌛ Testing commit e6c606f00b91f87c8b103a276187befef15aad79 with merge d5c2a3865e84ad54b9f9dc928dd57bc5a416ecf3... |
💔 Test failed - status-travis |
@bors retry — http://crosstool-ng.org was down. |
🔒 Merge conflict |
@bors r=petrochenkov rebased to latest master, no actual merge conflict found |
📌 Commit c60aab2 has been approved by |
When attempting to write str with single quote suggest double quotes Fix #26101.
☀️ Test successful - status-appveyor, status-travis |
Fix #26101.