about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2020-12-30 16:38:25 -0800
committerCamelid <camelidcamel@gmail.com>2020-12-30 16:38:25 -0800
commit75705ab3a92bdc5bd5de1aba93013ecd852be6f7 (patch)
tree13693a7a5d8d97d4adc79519a269186137413950 /src/librustdoc/html
parent478cbb0095a50a94118c8165a52c1f42f19982d5 (diff)
downloadrust-75705ab3a92bdc5bd5de1aba93013ecd852be6f7.tar.gz
rust-75705ab3a92bdc5bd5de1aba93013ecd852be6f7.zip
Update `find_nearest_parent_module`
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/format.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 90f4aaefc9b..9fca005c34e 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -15,7 +15,7 @@ use rustc_middle::ty::TyCtxt;
 use rustc_span::def_id::{DefId, CRATE_DEF_INDEX};
 use rustc_target::spec::abi::Abi;
 
-use crate::clean::{self, utils::find_closest_parent_module, PrimitiveType};
+use crate::clean::{self, utils::find_nearest_parent_module, PrimitiveType};
 use crate::formats::cache::cache;
 use crate::formats::item_type::ItemType;
 use crate::html::escape::Escape;
@@ -1097,7 +1097,7 @@ impl clean::Visibility {
             clean::Inherited => Ok(()),
 
             clean::Visibility::Restricted(vis_did) => {
-                let parent_module = find_closest_parent_module(tcx, item_did);
+                let parent_module = find_nearest_parent_module(tcx, item_did);
 
                 if vis_did.index == CRATE_DEF_INDEX {
                     write!(f, "pub(crate) ")
@@ -1106,7 +1106,7 @@ impl clean::Visibility {
                     // is the same as no visibility modifier
                     Ok(())
                 } else if parent_module
-                    .map(|parent| find_closest_parent_module(tcx, parent))
+                    .map(|parent| find_nearest_parent_module(tcx, parent))
                     .flatten()
                     == Some(vis_did)
                 {