From 853368c1d3c92fa699ba5d1bd1cca2cd2703d4d1 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 17 Oct 2015 04:33:05 +0530 Subject: [PATCH] Make is_from_for_desugar sound (rust/28973 got fixed) --- src/utils.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 1ba6029ebe63..caf77332b626 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -164,11 +164,7 @@ pub fn is_from_for_desugar(decl: &Decl) -> bool { [ let DeclLocal(ref loc) = decl.node, let Some(ref expr) = loc.init, - // FIXME: This should check for MatchSource::ForLoop - // but right now there's a bug where the match source isn't - // set during lowering - // https://github.com/rust-lang/rust/pull/28973 - let ExprMatch(_, _, _) = expr.node + let ExprMatch(_, _, MatchSource::ForLoopDesugar) = expr.node ], { return true; } };