From 4b08c7e9748dafa9c38f090ca046a2f372739792 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Tue, 7 Jan 2020 15:13:47 +0100 Subject: [PATCH] NestedVisitorMap: reduce visibilities --- src/librustc/hir/intravisit.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc/hir/intravisit.rs b/src/librustc/hir/intravisit.rs index edecfd335fbb..e1245dbb6658 100644 --- a/src/librustc/hir/intravisit.rs +++ b/src/librustc/hir/intravisit.rs @@ -159,7 +159,7 @@ pub enum NestedVisitorMap<'this, 'tcx> { impl<'this, 'tcx> NestedVisitorMap<'this, 'tcx> { /// Returns the map to use for an "intra item-like" thing (if any). /// E.g., function body. - pub fn intra(self) -> Option<&'this Map<'tcx>> { + fn intra(self) -> Option<&'this Map<'tcx>> { match self { NestedVisitorMap::None => None, NestedVisitorMap::OnlyBodies(map) => Some(map), @@ -169,7 +169,7 @@ pub fn intra(self) -> Option<&'this Map<'tcx>> { /// Returns the map to use for an "item-like" thing (if any). /// E.g., item, impl-item. - pub fn inter(self) -> Option<&'this Map<'tcx>> { + fn inter(self) -> Option<&'this Map<'tcx>> { match self { NestedVisitorMap::None => None, NestedVisitorMap::OnlyBodies(_) => None, @@ -214,7 +214,7 @@ pub trait Visitor<'v>: Sized { /// `panic!()`. This way, if a new `visit_nested_XXX` variant is /// added in the future, we will see the panic in your code and /// fix it appropriately. - fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, 'v>; + fn nested_visit_map(&mut self) -> NestedVisitorMap<'_, 'v>; /// Invoked when a nested item is encountered. By default does /// nothing unless you override `nested_visit_map` to return other than