about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-01-07 15:13:47 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2020-01-08 21:58:41 +0100
commit4b08c7e9748dafa9c38f090ca046a2f372739792 (patch)
treea4bbeb9968d3bd319a5a4b971cdfd6e77e44e7d5 /src
parent3f13ba8523e8aefa670c061b0d0d5e551b47fb45 (diff)
downloadrust-4b08c7e9748dafa9c38f090ca046a2f372739792.tar.gz
rust-4b08c7e9748dafa9c38f090ca046a2f372739792.zip
NestedVisitorMap: reduce visibilities
Diffstat (limited to 'src')
-rw-r--r--src/librustc/hir/intravisit.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/hir/intravisit.rs b/src/librustc/hir/intravisit.rs
index edecfd335fb..e1245dbb665 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 @@ impl<'this, 'tcx> NestedVisitorMap<'this, '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