Skip to content

Issue3961 fix whitespace detection - #7114

Merged
bors merged 4 commits into
rust-lang:masterfrom
pnkfelix:issue3961-fix-whitespace-detection
Jun 16, 2013
Merged

Issue3961 fix whitespace detection#7114
bors merged 4 commits into
rust-lang:masterfrom
pnkfelix:issue3961-fix-whitespace-detection

Conversation

@pnkfelix

Copy link
Copy Markdown
Contributor

r? (yes, the review request is back, now that I got it building against incom... I mean master!)

(Attempting to port from orphaned pull-request #6764 )

Fix for #3961. Also includes a test case to illustrate the issues. (All of the entries that say "should align" should align with each other, and the four lines near the end that say "compare _" for _ in {A,B,C,D} should line up with each other.)

Before applying this change set:
-- the "(should align)"'s are all over the place, and the form/line feeding spaces are not cut out as one might or might not expect.
-- compare B and D do not match A and C.

(To be honest, its hard to really say what the right behavior is here, and people who are expecting a particular behavior out of a pretty printer in these cases may well get burned.)

@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

needs rebase; will do tomorrow.

@pnkfelixpnkfelix reopened this Jun 14, 2013
@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

r? @brson (or anyone else).

bors added a commit that referenced this pull request Jun 16, 2013
…n, r=brson
r? (yes, the review request is back, now that I got it building against incom... I mean master!)
(Attempting to port from orphaned pull-request #6764 )
Fix for #3961. Also includes a test case to illustrate the issues. (All of the entries that say "should align" should align with each other, and the four lines near the end that say "compare _" for _ in {A,B,C,D} should line up with each other.)
Before applying this change set:
-- the "(should align)"'s are all over the place, and the form/line feeding spaces are not cut out as one might or might not expect.
-- compare B and D do not match A and C.
(To be honest, its hard to really say what the right behavior is here, and people who are expecting a particular behavior out of a pretty printer in these cases may well get burned.)
@borsbors closed this Jun 16, 2013
@bors
bors merged commit 876f6de into rust-lang:masterJun 16, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 16, 2023
Disable `vec_box` when using different allocators
Fixesrust-lang#7114
This PR disables the `vec_box` lint when the `Box` and `Vec` use different allocators (but not when they use the same - custom - allocator).
For example - `Vec<Box<i32, DummyAllocator>>` will disable the lint, and `Vec<Box<i32, DummyAllocator>, DummyAllocator>` will not disable the lint.
In addition, the applicability of this lint has been changed to `Unspecified` due to the automatic fixes potentially breaking code such as the following:
```rs
fn foo() -> Vec<Box<i32>> { // -> Vec<i32>
vec![Box::new(1)]
}
```
It should be noted that the `if_chain->let-chains` fix has also been applied to this lint, so the diff does contain many changes.
changelog: disable `vec_box` lint when using nonstandard allocators
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pnkfelix@brson@bors