rustdoc::passes::collect_intra_doc_links

Function trait_impls_for

Source
fn trait_impls_for<'a>(
    cx: &mut DocContext<'a>,
    ty: Ty<'a>,
    module: DefId,
) -> FxIndexSet<(DefId, DefId)>
Expand description

Given a type, return all trait impls in scope in module for that type. Returns a set of pairs of (impl_id, trait_id).

NOTE: this cannot be a query because more traits could be available when more crates are compiled! So it is not stable to serialize cross-crate.