Function rustdoc::clean::inline::try_inline

source ·
pub(crate) fn try_inline(
    cx: &mut DocContext<'_>,
    res: Res,
    name: Symbol,
    attrs: Option<(&[Attribute], Option<DefId>)>,
    visited: &mut DefIdSet
) -> Option<Vec<Item>>
Expand description

Attempt to inline a definition into this AST.

This function will fetch the definition specified, and if it is from another crate it will attempt to inline the documentation from the other crate into this crate.

This is primarily used for pub use statements which are, in general, implementation details. Inlining the documentation should help provide a better experience when reading the documentation in this use case.

The returned value is None if the definition could not be inlined, and Some of a vector of items if it was successfully expanded.