aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-08-04 07:47:21 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-08-04 18:08:59 +0530
commit2d01e969f14a52d5565f7254d10f315464f56fcb (patch)
tree626f81ca23329b57f019fd96020164304e98eaff
parent1809748dc12ec63e3179b66109c91983f744c235 (diff)
downloadservo-2d01e969f14a52d5565f7254d10f315464f56fcb.tar.gz
servo-2d01e969f14a52d5565f7254d10f315464f56fcb.zip
Remove fixme for if let in lints and replace with unreachable!()
-rw-r--r--components/plugins/lints/unrooted_must_root.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/components/plugins/lints/unrooted_must_root.rs b/components/plugins/lints/unrooted_must_root.rs
index f07ed506fbd..dc116f311eb 100644
--- a/components/plugins/lints/unrooted_must_root.rs
+++ b/components/plugins/lints/unrooted_must_root.rs
@@ -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