rust/src/librustc/middle
Steve Klabnik 3b75f4b56e Rollup merge of #33345 - birkenfeld:issue-31754, r=pnkfelix
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
2016-05-11 09:27:43 -04:00
..
astconv_util.rs Fixup indentation after methodification. 2016-05-11 08:48:12 +03:00
const_qualif.rs
const_val.rs rustc: move middle::{def,def_id,pat_util} to hir. 2016-04-06 09:14:21 +03:00
cstore.rs rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users. 2016-05-11 04:14:58 +03:00
dataflow.rs rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users. 2016-05-11 04:14:58 +03:00
dead.rs rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users. 2016-05-11 04:14:58 +03:00
dependency_format.rs rustc: Implement custom panic runtimes 2016-05-09 08:22:36 -07:00
effect.rs rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users. 2016-05-11 04:14:58 +03:00
entry.rs rustc: move middle::{def,def_id,pat_util} to hir. 2016-04-06 09:14:21 +03:00
expr_use_visitor.rs rustc_typeck: Generalize over 'tcx != 'gcx. 2016-05-11 04:14:58 +03:00
free_region.rs rustc_typeck: Generalize over 'tcx != 'gcx. 2016-05-11 04:14:58 +03:00
intrinsicck.rs rustc: Split local type contexts interners from the global one. 2016-05-11 04:14:58 +03:00
lang_items.rs Auto merge of #32909 - sanxiyn:unused-trait-import-2, r=alexcrichton 2016-04-16 18:31:11 -07:00
liveness.rs rustc: Split local type contexts interners from the global one. 2016-05-11 04:14:58 +03:00
mem_categorization.rs rustc_typeck: Generalize over 'tcx != 'gcx. 2016-05-11 04:14:58 +03:00
privacy.rs Retire rustdocs ANALYSISKEY 2016-04-13 19:39:17 +02:00
reachable.rs rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users. 2016-05-11 04:14:58 +03:00
recursion_limit.rs
region.rs Clean up some info log spam. 2016-04-14 12:21:52 -07:00
resolve_lifetime.rs middle: reset loop labels while visiting closure 2016-05-02 16:48:36 +02:00
stability.rs Fixup indentation after methodification. 2016-05-11 08:48:12 +03:00
weak_lang_items.rs rustc: Implement custom panic runtimes 2016-05-09 08:22:36 -07:00