-
Notifications
You must be signed in to change notification settings - Fork 389
Add atomic min and max #1721
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
Add atomic min and max #1721
Conversation
2534836
to
30b5791
Compare
Thanks a lot for the PR. :)
This causes quite a lot of noise, which makes review harder. Can you make the formatting changes a separate commit in the PR, or (even better) create a separate format-only PR? (Please don't rustfmt the entire repository, only these two files. There are some other files where rustfmt does a bad job, so I am waiting for some rustfmt fixes before formatting the entire repository.) |
5b73931
to
350e02b
Compare
@RalfJung As you suggested in this comment, I've merged the enum AtomicOp {
MirOp(mir::BinOp, bool),
Max,
Min,
} Also, how do I fix the CI errors (I'm not sure how to should I implement the trait the diagnostic suggested -the code with errors was from the previous PR-)? |
(I'm afraid I will probably not be able to take a look at the CI errors at least until the weekend, I am quite busy until next Tuesday.) |
2128265
to
304d22a
Compare
@oli-obk Do you know what the problem is? Error from CI:
|
c865a35
to
e574714
Compare
@oli-obk CI still fails though... |
Yea, that's a regular build error, I approved the general code. Looks like you have references when a noon-reference was expected and an |
e574714
to
8d7a8b1
Compare
@oli-obk Understood! I didn't know that, thanks. I've changed the code accordingly. |
8d7a8b1
to
d0c223e
Compare
Just out of curiosity: you are not building locally at all? |
@oli-obk No not really, I will next time though. Not sure why I'm not. Edit: Well, I kind of do have a reason: it takes more time to build locally than to look at the CI. |
This concern is still open, isn't it? Review is made difficult by having formatting changes and actual behavior changes in the same commit. |
from scratch I understand that, but if you have that on every build, we should look into that. Also, you still have some compilation failures. |
@henryboisdequin We described in our contributors guide how to set up an environment for local builds. If you have any questions about that, feel free to ask. :) |
@RalfJung Do you the best way to put all the formatting changes into one commit efficently? |
You could try starting with master, doing the formatting, committing that, and then rebasing the remaining changes on top of that and hope that git conflict resolution works well. There's more advanced alternatives but they are harder to explain.^^ |
d0c223e
to
45d53ce
Compare
@RalfJung Done, this is ready for review |
5d15d91
to
144dbfe
Compare
The build is still failing, maybe the rebase caused some match arms to get duplicated? |
144dbfe
to
2f3f9d6
Compare
@oli-obk Thanks for the reminder, I was wondering why the diff was larger than before but didn't look into it 🤔 |
487ebc4
to
f0e4587
Compare
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.
I think you can squash all commits after the second one into the second one, as they are just going back and forth
Co-authored-by: Greg Bowyer <[email protected]>
f0e4587
to
f8440d6
Compare
@oli-obk Commits squashed ✅ |
@bors r+ |
📌 Commit f8440d6 has been approved by |
☀️ Test successful - checks-actions |
Closes #1718
Previous attempt: #1653
TODO:
atomic_op
andatomic_min_max
functionsNote: this PR also removes arbitrary trailing whitespace and generally formats the affected files