rust/compiler/rustc_passes/src
bors ee5d8d37ba Auto merge of #90986 - camsteffen:nested-filter, r=cjgillot
Replace `NestedVisitorMap` with generic `NestedFilter`

This is an attempt to make the `intravisit::Visitor` API simpler and "more const" with regard to nested visiting.

With this change, `intravisit::Visitor` does not visit nested things by default, unless you specify `type NestedFilter = nested_filter::OnlyBodies` (or `All`). `nested_visit_map` returns `Self::Map` instead of `NestedVisitorMap<Self::Map>`. It panics by default (unreachable if `type NestedFilter` is omitted).

One somewhat trixty thing here is that `nested_filter::{OnlyBodies, All}` live in `rustc_middle` so that they may have `type Map = map::Map` and so that `impl Visitor`s never need to specify `type Map` - it has a default of `Self::NestedFilter::Map`.
2022-01-17 14:50:50 +00:00
..
liveness Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
check_attr.rs Auto merge of #90986 - camsteffen:nested-filter, r=cjgillot 2022-01-17 14:50:50 +00:00
check_const.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
dead.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
diagnostic_items.rs Introduce get_diagnostic_name 2021-10-06 08:40:28 -05:00
entry.rs Reduce use of local_def_id_to_hir_id. 2022-01-15 21:26:25 +01:00
hir_id_validator.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
hir_stats.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
intrinsicck.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
lang_items.rs Clean up lang_items::extract 2022-01-09 13:41:04 -08:00
layout_test.rs Remove in_band_lifetimes for rustc_passes 2021-12-15 20:12:53 -07:00
lib_features.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
lib.rs Reduce use of local_def_id_to_hir_id. 2022-01-15 21:26:25 +01:00
liveness.rs Auto merge of #90986 - camsteffen:nested-filter, r=cjgillot 2022-01-17 14:50:50 +00:00
loops.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
naked_functions.rs Auto merge of #90986 - camsteffen:nested-filter, r=cjgillot 2022-01-17 14:50:50 +00:00
reachable.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
region.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
stability.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
upvars.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
weak_lang_items.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00