Skip to content

Commit 0a3048d

Browse files
camelidMark-Simulacrum
authored andcommitted
Add note on panic behavior
1 parent dc7eb41 commit 0a3048d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustdoc/clean/utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,8 @@ where
626626
}
627627

628628
/// Find the nearest parent module of a [`DefId`].
629+
///
630+
/// **Panics if the item it belongs to [is fake][Item::is_fake].**
629631
crate fn find_nearest_parent_module(tcx: TyCtxt<'_>, def_id: DefId) -> Option<DefId> {
630632
if def_id.is_top_level_module() {
631633
// The crate root has no parent. Use it as the root instead.

0 commit comments

Comments
 (0)