-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix breakage due to rust-lang/rust#61988 #4258
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
Conversation
Manishearth
left a comment
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.
r=me with desugaring in utils
clippy_lints/src/loops.rs
Outdated
| if let ExprKind::Loop(block, _, LoopSource::While) = &expr.node; | ||
| if let Block { expr: Some(expr), .. } = &**block; | ||
| if let ExprKind::Match(cond, arms, MatchSource::WhileDesugar) = &expr.node; | ||
| if let ExprKind::DropTemps(cond) = &cond.node; |
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 should be a while_desugar in utils like the if_let_desugar and for_desugar we already have
clippy_lints/src/loops.rs
Outdated
| }, | ||
| NeverLoopResult::MayContinueMainLoop | NeverLoopResult::Otherwise => (), | ||
| } | ||
| }; |
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.
Is this ; needed?
clippy_lints/src/utils/author.rs
Outdated
| match des { | ||
| hir::LoopSource::ForLoop => "LoopSource::ForLoop", | ||
| hir::LoopSource::Loop => "LoopSource::Loop", | ||
| hir::LoopSource::While => "LoopSource::WhileDesugar", |
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.
=> "LoopSource::While",
|
@bors r+ thanks! |
|
📌 Commit adcc02e has been approved by |
Fix breakage due to rust-lang/rust#61988 changelog: none
|
@Manishearth reapprove? |
|
@bors r+ |
|
📌 Commit c72be0f has been approved by |
Fix breakage due to rust-lang/rust#61988 changelog: none
|
☀️ Test successful - checks-travis, status-appveyor |
changelog: none