mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 14:43:24 +00:00
Make is_from_for_desugar sound (rust/28973 got fixed)
This commit is contained in:
parent
e24d469849
commit
853368c1d3
@ -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; }
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user