3b75f4b56e
middle: reset loop labels while visiting closure This should fix #31754 and follow-up #25343. Before the latter, the closure was visited twice in the context of the enclosing fn, which made even a single closure with a loop label emit a warning. With this change, the closure is still visited within the context of the main fn (which is intended, since it is not a separate item) but resets the found loop labels while being visited. Fixes: #31754 Note: I amended the test file from #25343, but I don't know if the original or amended test are effective, since as far as I could see, compiletest's run-pass tests do not check for zero warnings emitted? /cc @Manishearth |
||
---|---|---|
.. | ||
astconv_util.rs | ||
const_qualif.rs | ||
const_val.rs | ||
cstore.rs | ||
dataflow.rs | ||
dead.rs | ||
dependency_format.rs | ||
effect.rs | ||
entry.rs | ||
expr_use_visitor.rs | ||
free_region.rs | ||
intrinsicck.rs | ||
lang_items.rs | ||
liveness.rs | ||
mem_categorization.rs | ||
privacy.rs | ||
reachable.rs | ||
recursion_limit.rs | ||
region.rs | ||
resolve_lifetime.rs | ||
stability.rs | ||
weak_lang_items.rs |