-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustfmt libarena/lib.rs #47069
rustfmt libarena/lib.rs #47069
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (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. |
self.ptr.set(intrinsics::arith_offset(self.ptr.get() as *mut u8, 1) as *mut T); | ||
self.ptr | ||
.set(intrinsics::arith_offset(self.ptr.get() as *mut u8, 1) | ||
as *mut T); |
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.
this seems wrong. identical construct below puts intrinsics
-- as *mut T
on one line
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.
Why do we use intrinsics::arith_offset(x, 1)
instead of x.wrapping_offset(1)
anyway?
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.
@mrhota Should I submit an issue to the Rustfmt repo?
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 we're comparing this to (new) line 369, the difference is because line 369 is one level outdented from this line. That's the reason for the difference.
Still seems like bad formatting, though.
Thanks for the PR! We’ll periodically check in on it to make sure that @nrc or someone else from the team reviews it soon. |
review ping for you @nrc! pinging you on IRC too! |
@bors: r+ |
📌 Commit b2d0d18 has been approved by |
rustfmt libarena/lib.rs Note: it's my very first pull request. I'm trying to do something very simple to see how it works here, even if it's a tiny change or maybe it's not correct (sorry if it is the case). r? @nrc
Note: it's my very first pull request. I'm trying to do something very simple to see how it works here, even if it's a tiny change or maybe it's not correct (sorry if it is the case).
r? @nrc