-
Notifications
You must be signed in to change notification settings - Fork 12.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
Allow optimizing u32::from::<char>
.
#124905
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @workingjubilee. Use |
u32::from::<char>
.
r? @joboet |
You could use a |
Arguably this should be done in the backend for |
Agreed, however I don't know where the code for that lives. |
That would be rust/compiler/rustc_codegen_ssa/src/mir/rvalue.rs Lines 529 to 531 in cb93c24
|
4a436dc
to
537d59e
Compare
I don't feel comfortable reviewing compiler changes, so That said, I think this is a good idea! |
☔ The latest upstream changes (presumably #123886) made this pull request unmergeable. Please resolve the merge conflicts. |
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
This comment has been minimized.
This comment has been minimized.
526aa8c
to
c56d4b2
Compare
c56d4b2
to
b7f60e0
Compare
Probably best to squash the first two commits, since they add then revert the library change |
b7f60e0
to
4b90690
Compare
This comment has been minimized.
This comment has been minimized.
4b90690
to
a9d29db
Compare
Thanks, this is looking good! One more request, then |
@scottmcm, I think changing the test to use |
Extracted from #124307.
This allows optimizing the panicking branch in the
escape_unicode
function, see https://rust.godbolt.org/z/61YhKrhvP.