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

add a pair of whitespace after remove parentheses #63163

Merged
merged 4 commits into from
Aug 7, 2019

Conversation

bravomikekilo
Copy link
Contributor

fix issue-63156.
add a pair of whitespace after remove parentheses.

@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 @cramertj (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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2019
@cramertj
Copy link
Member

I don't think we should add the spaces unconditionally, since that would cause there to be double-spaces in the code that most folks probably tried to write: if (x < 0) { ... } -> if x < 0 { ... }

@Centril
Copy link
Contributor

Centril commented Jul 31, 2019

Would be good to add a regression test also.

@bravomikekilo
Copy link
Contributor Author

OK. I will check the position of if while and match and add spaces conditionally.

@bravomikekilo
Copy link
Contributor Author

I add some conditional spaces. But there is a problem, I can't find the Span of in keyword in ForLoop, so code like for i in(0..3) {..} will become for i in0..3 {}. Can anyone give me some suggestion or just keep the old behavior?

@rust-highfive

This comment has been minimized.

@bravomikekilo
Copy link
Contributor Author

Tidy problem is fixed. ForLoop now is keeping the old behavior. new tests are added.

@bravomikekilo
Copy link
Contributor Author

Can this pull request be merged or there are other problems to be fixed? @cramertj

@cramertj
Copy link
Member

cramertj commented Aug 5, 2019

It looks good to me, although it'd be great to add a rustfix test, to make sure that our suggestions are being applied correctly. r=me with that change.

@bravomikekilo
Copy link
Contributor Author

r? @cramertj
rustfix test added

@bravomikekilo
Copy link
Contributor Author

r= @cramertj

@cramertj
Copy link
Member

cramertj commented Aug 6, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Aug 6, 2019

📌 Commit 3a95c71 has been approved by cramertj

@bors bors 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 Aug 6, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 6, 2019
add a pair of whitespace after remove parentheses

fix [issue-63156](rust-lang#63156).
add a pair of whitespace after remove parentheses.
bors added a commit that referenced this pull request Aug 7, 2019
Rollup of 9 pull requests

Successful merges:

 - #63034 (Fix generator size regressions due to optimization)
 - #63035 (Use MaybeUninit to produce more correct layouts)
 - #63163 (add a pair of whitespace after remove parentheses)
 - #63294 (tests for async/await drop order)
 - #63307 (don't ignore mir_dump folder)
 - #63308 (PlaceRef's base is already a reference)
 - #63310 (Tests around moving parts of structs and tuples across await points)
 - #63314 (doc: the content has since been moved to the guide)
 - #63333 (Remove unnecessary features from compiler error code list)

Failed merges:

r? @ghost
@bors bors merged commit 3a95c71 into rust-lang:master Aug 7, 2019
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.

lint of unnecessary parentheses around if condition may case error
5 participants