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

Fix fallout from rust-lang/rust PR 60861 #4123

Merged
merged 5 commits into from
Jun 24, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented May 21, 2019

Fixes incoming breakage for unlanded rust-lang/rust#60861.

Tests are passing locally; the Rust PR now needs to land first.

@Manishearth also says we'll want to split out to a collapsible_if_let once we have let-chains working in Rust nightly or something.

@Centril Centril changed the title [WIP] Initial fix for fallout from rust-lang/rust PR 60861 [WIP] Fix fallout from rust-lang/rust PR 60861 May 21, 2019
@Centril Centril force-pushed the rustup-let-chains-ast branch 2 times, most recently from 11fb3c1 to f6a5506 Compare May 21, 2019 06:51
@Centril Centril changed the title [WIP] Fix fallout from rust-lang/rust PR 60861 Fix fallout from rust-lang/rust PR 60861 May 21, 2019
@flip1995 flip1995 added the S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work label May 28, 2019
@Centril
Copy link
Contributor Author

Centril commented Jun 23, 2019

Should be ready to go, I think.

@tesuji
Copy link
Contributor

tesuji commented Jun 23, 2019

Your build has failed.

@Centril
Copy link
Contributor Author

Centril commented Jun 24, 2019

Let's see if we do better this time.

@tesuji
Copy link
Contributor

tesuji commented Jun 24, 2019

Formatting error, but it is a little weird (might need to improve on rustfmt side):

Diff in /Users/travis/build/rust-lang/rust-clippy/clippy_lints/src/needless_continue.rs at line 210:
     F: FnMut(&ast::Block, Option<&ast::Label>),
 {
     if let ast::ExprKind::While(_, loop_block, label)
-        | ast::ExprKind::ForLoop(_, _, loop_block, label)
-        | ast::ExprKind::Loop(loop_block, label)
-        = &expr.node
+    | ast::ExprKind::ForLoop(_, _, loop_block, label)
+    | ast::ExprKind::Loop(loop_block, label) = &expr.node
     {
         func(loop_block, label.as_ref());
     }

@Centril
Copy link
Contributor Author

Centril commented Jun 24, 2019

Ugh... I tested this locally with cargo test. :(

The contributing guidelines needs some updating as they say nothing about formatting.

| ast::ExprKind::ForLoop(_, _, loop_block, label)
| ast::ExprKind::Loop(loop_block, label)
= &expr.node
| ast::ExprKind::ForLoop(_, _, loop_block, label)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is truly hideous... cc @topecongiro

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clippy_lints/src/formatting.rs Outdated Show resolved Hide resolved
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 24, 2019

📌 Commit 46a0e54 has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented Jun 24, 2019

⌛ Testing commit 46a0e54 with merge 8c80b65...

bors added a commit that referenced this pull request Jun 24, 2019
Fix fallout from rust-lang/rust PR 60861

Fixes incoming breakage for unlanded rust-lang/rust#60861.

Tests are passing locally; the Rust PR now needs to land first.

@Manishearth also says we'll want to split out to a `collapsible_if_let` once we have let-chains working in Rust nightly or something.
@bors
Copy link
Collaborator

bors commented Jun 24, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Manishearth
Pushing 8c80b65 to master...

@bors bors merged commit 46a0e54 into rust-lang:master Jun 24, 2019
@Centril Centril deleted the rustup-let-chains-ast branch June 24, 2019 06:11
bors added a commit that referenced this pull request Jun 24, 2019
Replace `unsugar_if` function with `is_if` function

cc #4123 (comment)

changelog: none

r? @Manishearth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants