-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Description
Hi,
The documentation for the rustc_hir::intravisit::Visitor
trait mentions an itemlikevisitor::ItemLikeVisitor
pattern that does not exist in the codebase anymore.
Here is the outdated doc page: https://doc.rust-lang.org/beta/nightly-rustc/rustc_hir/intravisit/trait.Visitor.html
Or here are exactly the places in the code where the outdated texts occur:
rust/compiler/rustc_hir/src/intravisit.rs
Lines 155 to 157 in 60713f4
/// See the comments on `ItemLikeVisitor` for more details on the overall | |
/// visit strategy. | |
pub trait NestedFilter<'hir> { |
And:
rust/compiler/rustc_hir/src/intravisit.rs
Lines 228 to 236 in 60713f4
/// Invoked when a nested item is encountered. By default, when | |
/// `Self::NestedFilter` is `nested_filter::None`, this method does | |
/// nothing. **You probably don't want to override this method** -- | |
/// instead, override [`Self::NestedFilter`] or use the "shallow" or | |
/// "deep" visit patterns described on | |
/// `itemlikevisit::ItemLikeVisitor`. The only reason to override | |
/// this method is if you want a nested pattern but cannot supply a | |
/// [`Map`]; see `nested_visit_map` for advice. | |
fn visit_nested_item(&mut self, id: ItemId) { |
The itemlikevisitor::ItemLikeVisitor
pattern was removed in the 93616dd commit by @kckeiks.
It would be nice to update the documentation on what should we use now in place of ItemLikeVisitor
. I don't have that knowledge yet and I am not sure if I manage to find that out myself to improve that documentation.