rustdoc::clean

Function first_non_private

source
fn first_non_private<'tcx>(
    cx: &mut DocContext<'tcx>,
    hir_id: HirId,
    path: &Path<'tcx>,
) -> Option<Path>
Expand description

The goal of this function is to return the first Path which is not private (ie not private or doc(hidden)). If it’s not possible, it’ll return the “end type”.

If the path is not a re-export or is public, it’ll return None.