Skip to content
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

Merged
merged 2 commits into from
Jan 12, 2018
Merged

rustfmt libarena/lib.rs #47069

merged 2 commits into from
Jan 12, 2018

Conversation

Kagamihime
Copy link

@Kagamihime Kagamihime commented Dec 29, 2017

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

@rust-highfive
Copy link
Collaborator

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);
Copy link
Contributor

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

Copy link
Member

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?

Copy link
Author

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?

Copy link
Contributor

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.

@kennytm
Copy link
Member

kennytm commented Jan 3, 2018

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.

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 3, 2018
@carols10cents
Copy link
Member

review ping for you @nrc! pinging you on IRC too!

@nrc
Copy link
Member

nrc commented Jan 12, 2018

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 12, 2018

📌 Commit b2d0d18 has been approved by nrc

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 12, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Jan 12, 2018
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
bors added a commit that referenced this pull request Jan 12, 2018
@bors bors merged commit b2d0d18 into rust-lang:master Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants