[−][src]Enum rustc_hir::intravisit::NestedVisitorMap
Specifies what nested things a visitor wants to visit. The most
common choice is OnlyBodies, which will cause the visitor to
visit fn bodies for fns that it encounters, but skip over nested
item-like things.
See the comments on ItemLikeVisitor for more details on the overall
visit strategy.
Variants
Do not visit any nested things. When you add a new "non-nested" thing, you will want to audit such uses to see if they remain valid.
Use this if you are only walking some particular kind of tree (i.e., a type, or fn signature) and you don't want to thread a HIR map around.
Do not visit nested item-like things, but visit nested things that are inside of an item-like.
This is the most common choice. A very common pattern is
to use visit_all_item_likes() as an outer loop,
and to have the visitor that visits the contents of each item
using this setting.
Visits all nested things, including item-likes.
This is an unusual choice. It is used when you want to
process everything within their lexical context. Typically you
kick off the visit by doing walk_krate().
Implementations
impl<M> NestedVisitorMap<M>[src]
pub(in intravisit) fn intra(
self
) -> Option<M>[src]
self
) -> Option<M>
Returns the map to use for an "intra item-like" thing (if any). E.g., function body.
pub(in intravisit) fn inter(
self
) -> Option<M>[src]
self
) -> Option<M>
Returns the map to use for an "item-like" thing (if any). E.g., item, impl-item.
Auto Trait Implementations
impl<M> RefUnwindSafe for NestedVisitorMap<M> where
M: RefUnwindSafe,
M: RefUnwindSafe,
impl<M> Send for NestedVisitorMap<M> where
M: Send,
M: Send,
impl<M> Sync for NestedVisitorMap<M> where
M: Sync,
M: Sync,
impl<M> Unpin for NestedVisitorMap<M> where
M: Unpin,
M: Unpin,
impl<M> UnwindSafe for NestedVisitorMap<M> where
M: UnwindSafe,
M: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,