We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc7eb41 commit 0a3048dCopy full SHA for 0a3048d
src/librustdoc/clean/utils.rs
@@ -626,6 +626,8 @@ where
626
}
627
628
/// Find the nearest parent module of a [`DefId`].
629
+///
630
+/// **Panics if the item it belongs to [is fake][Item::is_fake].**
631
crate fn find_nearest_parent_module(tcx: TyCtxt<'_>, def_id: DefId) -> Option<DefId> {
632
if def_id.is_top_level_module() {
633
// The crate root has no parent. Use it as the root instead.
0 commit comments