-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Fix issue #64732 #64783
Fix issue #64732 #64783
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@onehr: thanks, this looks good! Could you add a test somewhere in |
@varkor Thanks for your help! So do I need to put the test into any specific file or it's ok to create a new one and name it? |
You can create a new one. If you can come up with a relevant name, you can put it under |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Based on issue #64732, when creating a byte literal with single quotes, the suggestion message would indicate that you meant to write a `str` literal, but we actually meant to write a byte string literal. So I changed the unescape_error_reporting.rs to decide whether to print out "if you meant to write a `str` literal, use double quotes", or "if you meant to write a byte string literal, use double quotes".
Hi @varkor, I have changed the code based on your review and added the test case for it, can you give it a check? |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
📌 Commit a048447 has been approved by |
Fix issue rust-lang#64732 Based on issue rust-lang#64732, when creating a byte literal with single quotes, the suggestion message would indicate that you meant to write a `str` literal, but we actually meant to write a byte string literal. So I changed the unescape_error_reporting.rs to decide whether to print out "if you meant to write a `str` literal, use double quotes", or "if you meant to write a byte string literal, use double quotes". Fixes rust-lang#64732.
Based on issue #64732, when creating a byte literal with single quotes,
the suggestion message would indicate that you meant to write a
str
literal,but we actually meant to write a byte string literal.
So I changed the unescape_error_reporting.rs to decide whether to print out
"if you meant to write a
str
literal, use double quotes",or "if you meant to write a byte string literal, use double quotes".
Fixes #64732.