diff options
| author | bors <bors@rust-lang.org> | 2022-01-17 14:50:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-17 14:50:50 +0000 |
| commit | 8f481167da756a15edcce0f9f104846714e22674 (patch) | |
| tree | 26d4bbc125b37560541e80e4902ad065e17ce3b5 /compiler/rustc_mir_transform/src/coverage/tests.rs | |
| parent | 55fa2ea00c873d09c089e234f246798f53520e9b (diff) | |
| parent | eb80da175c493e5dbf431bad153a1f20ebfa998a (diff) | |
| download | rust-8f481167da756a15edcce0f9f104846714e22674.tar.gz rust-8f481167da756a15edcce0f9f104846714e22674.zip | |
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`.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/tests.rs')
0 files changed, 0 insertions, 0 deletions
