about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRose Hudson <cv21874@bristol.ac.uk>2022-02-11 15:34:33 +0000
committerRose Hudson <cv21874@bristol.ac.uk>2022-02-11 15:38:31 +0000
commit45dc8ebb7c860939e045cfb758968c014fdeb96d (patch)
tree2d1f3245d3d8cbad91c1c7fb5bbb4c56df143d8e
parente273fca380c5d28bc32b25ac1a885c61d4c5e75e (diff)
downloadrust-45dc8ebb7c860939e045cfb758968c014fdeb96d.tar.gz
rust-45dc8ebb7c860939e045cfb758968c014fdeb96d.zip
fix mention of moved function in `rustc_hir` docs
the function was moved from `Crate` to `Map` in db9fea508a6d but the
docs weren't updated
-rw-r--r--compiler/rustc_hir/src/itemlikevisit.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir/src/itemlikevisit.rs b/compiler/rustc_hir/src/itemlikevisit.rs
index 0db562f91a6..db70002c2d6 100644
--- a/compiler/rustc_hir/src/itemlikevisit.rs
+++ b/compiler/rustc_hir/src/itemlikevisit.rs
@@ -8,7 +8,7 @@ use super::{ForeignItem, ImplItem, Item, TraitItem};
 ///
 /// 1. **Shallow visit**: Get a simple callback for every item (or item-like thing) in the HIR.
 ///    - Example: find all items with a `#[foo]` attribute on them.
-///    - How: Implement `ItemLikeVisitor` and call `tcx.hir().krate().visit_all_item_likes()`.
+///    - How: Implement `ItemLikeVisitor` and call `tcx.hir().visit_all_item_likes()`.
 ///    - Pro: Efficient; just walks the lists of item-like things, not the nodes themselves.
 ///    - Con: Don't get information about nesting
 ///    - Con: Don't have methods for specific bits of HIR, like "on
@@ -19,9 +19,9 @@ use super::{ForeignItem, ImplItem, Item, TraitItem};
 ///    - Example: Examine each expression to look for its type and do some check or other.
 ///    - How: Implement `intravisit::Visitor` and override the `nested_visit_map()` method
 ///      to return `NestedVisitorMap::OnlyBodies` and use
-///      `tcx.hir().krate().visit_all_item_likes(&mut visitor.as_deep_visitor())`. Within
-///      your `intravisit::Visitor` impl, implement methods like `visit_expr()` (don't forget
-///      to invoke `intravisit::walk_expr()` to keep walking the subparts).
+///      `tcx.hir().visit_all_item_likes(&mut visitor.as_deep_visitor())`. Within your
+///      `intravisit::Visitor` impl, implement methods like `visit_expr()` (don't forget to invoke
+///      `intravisit::walk_expr()` to keep walking the subparts).
 ///    - Pro: Visitor methods for any kind of HIR node, not just item-like things.
 ///    - Pro: Integrates well into dependency tracking.
 ///    - Con: Don't get information about nesting between items