mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #6945 - Manishearth:fixedme, r=jdm
If let is not an issue for lints r? @Ms2ger <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6945) <!-- Reviewable:end -->
This commit is contained in:
commit
b7e592443f
1 changed files with 6 additions and 4 deletions
|
@ -202,10 +202,12 @@ impl LintPass for UnrootedPass {
|
|||
// We need not check arms individually since enum/struct fields are already
|
||||
// linted in `check_struct_def` and `check_variant`
|
||||
// (so there is no way of destructuring out a `#[must_root]` field)
|
||||
ast::ExprMatch(ref e, _, _) |
|
||||
// For loops allow you to bind a return value locally
|
||||
ast::ExprForLoop(_, ref e, _, _) => &**e,
|
||||
// XXXManishearth look into `if let` once it lands in our rustc
|
||||
ast::ExprMatch(ref e, _, _) => &**e,
|
||||
// These are able to bind local variables, but are desugared into
|
||||
// loops and matches pre-lint so should not be encountered
|
||||
ast::ExprForLoop(..) => unreachable!(),
|
||||
ast::ExprIfLet(..) => unreachable!(),
|
||||
ast::ExprWhileLet(..) => unreachable!(),
|
||||
_ => return
|
||||
},
|
||||
_ => return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue