diff options
| author | Camelid <camelidcamel@gmail.com> | 2020-12-30 16:38:25 -0800 |
|---|---|---|
| committer | Camelid <camelidcamel@gmail.com> | 2020-12-30 16:38:25 -0800 |
| commit | 75705ab3a92bdc5bd5de1aba93013ecd852be6f7 (patch) | |
| tree | 13693a7a5d8d97d4adc79519a269186137413950 /src/librustdoc/html | |
| parent | 478cbb0095a50a94118c8165a52c1f42f19982d5 (diff) | |
| download | rust-75705ab3a92bdc5bd5de1aba93013ecd852be6f7.tar.gz rust-75705ab3a92bdc5bd5de1aba93013ecd852be6f7.zip | |
Update `find_nearest_parent_module`
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/format.rs | 6 |
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) { |
