Skip to content

The rustc_hir::intravisit::Visitor trait documentation mentions ItemLikeVisitor that was removed  #114885

Open
@disconnect3d

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:

/// See the comments on `ItemLikeVisitor` for more details on the overall
/// visit strategy.
pub trait NestedFilter<'hir> {

And:

/// 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

A-docsArea: documentation for any part of the project, including the compiler, standard library, and toolsE-help-wantedCall for participation: Help is requested to fix this issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions