Struct rustdoc::passes::collect_intra_doc_links::early::EarlyDocLinkResolver
source · [−]struct EarlyDocLinkResolver<'r, 'ra> {
resolver: &'r mut Resolver<'ra>,
sess: &'r Session,
parent_scope: ParentScope<'ra>,
visited_mods: DefIdSet,
markdown_links: FxHashMap<String, Vec<PreprocessedMarkdownLink>>,
doc_link_resolutions: FxHashMap<(Symbol, Namespace, DefId), Option<Res<NodeId>>>,
traits_in_scope: DefIdMap<Vec<TraitCandidate>>,
all_traits: Vec<DefId>,
all_trait_impls: Vec<DefId>,
all_macro_rules: FxHashMap<Symbol, Res<NodeId>>,
document_private_items: bool,
}
Fields
resolver: &'r mut Resolver<'ra>
sess: &'r Session
parent_scope: ParentScope<'ra>
visited_mods: DefIdSet
markdown_links: FxHashMap<String, Vec<PreprocessedMarkdownLink>>
doc_link_resolutions: FxHashMap<(Symbol, Namespace, DefId), Option<Res<NodeId>>>
traits_in_scope: DefIdMap<Vec<TraitCandidate>>
all_traits: Vec<DefId>
all_trait_impls: Vec<DefId>
all_macro_rules: FxHashMap<Symbol, Res<NodeId>>
document_private_items: bool
Implementations
sourceimpl<'ra> EarlyDocLinkResolver<'_, 'ra>
impl<'ra> EarlyDocLinkResolver<'_, 'ra>
fn add_traits_in_scope(&mut self, def_id: DefId)
sourcefn process_extern_impls(&mut self)
fn process_extern_impls(&mut self)
Add traits in scope for links in impls collected by the collect-intra-doc-links
pass.
That pass filters impls using type-based information, but we don’t yet have such
information here, so we just conservatively calculate traits in scope for all modules
having impls in them.
fn resolve_doc_links_extern_impl(&mut self, def_id: DefId, is_inherent: bool)
fn resolve_doc_links_extern_outer_fixme(&mut self, def_id: DefId, scope_id: DefId)
fn resolve_doc_links_extern_outer(&mut self, def_id: DefId, scope_id: DefId)
fn resolve_doc_links_extern_inner(&mut self, def_id: DefId)
fn resolve_doc_links_local(&mut self, attrs: &[Attribute])
fn resolve_and_cache(
&mut self,
path_str: &str,
ns: Namespace,
parent_scope: &ParentScope<'ra>
) -> bool
fn resolve_doc_links(&mut self, attrs: Attributes, parent_scope: ParentScope<'ra>)
sourcefn process_module_children_or_reexports(&mut self, module_id: DefId)
fn process_module_children_or_reexports(&mut self, module_id: DefId)
When reexports are inlined, they are replaced with item which they refer to, those items may have links in their doc comments, those links are resolved at the item definition site, so we need to know traits in scope at that definition site.
Trait Implementations
sourceimpl Visitor<'_> for EarlyDocLinkResolver<'_, '_>
impl Visitor<'_> for EarlyDocLinkResolver<'_, '_>
fn visit_item(&mut self, item: &Item)
fn visit_assoc_item(&mut self, item: &AssocItem, ctxt: AssocCtxt)
fn visit_foreign_item(&mut self, item: &ForeignItem)
fn visit_variant(&mut self, v: &Variant)
fn visit_field_def(&mut self, field: &FieldDef)
fn visit_block(&mut self, block: &Block)
fn visit_ident(&mut self, _ident: Ident)
fn visit_local(&mut self, l: &'ast Local)
fn visit_stmt(&mut self, s: &'ast Stmt)
fn visit_param(&mut self, param: &'ast Param)
fn visit_arm(&mut self, a: &'ast Arm)
fn visit_pat(&mut self, p: &'ast Pat)
fn visit_anon_const(&mut self, c: &'ast AnonConst)
fn visit_expr(&mut self, ex: &'ast Expr)
fn visit_expr_post(&mut self, _ex: &'ast Expr)
fn visit_ty(&mut self, t: &'ast Ty)
fn visit_generic_param(&mut self, param: &'ast GenericParam)
fn visit_generics(&mut self, g: &'ast Generics)
fn visit_closure_binder(&mut self, b: &'ast ClosureBinder)
fn visit_where_predicate(&mut self, p: &'ast WherePredicate)
fn visit_fn(&mut self, fk: FnKind<'ast>, Span, NodeId)
fn visit_trait_ref(&mut self, t: &'ast TraitRef)
fn visit_param_bound(&mut self, bounds: &'ast GenericBound, _ctxt: BoundKind)
fn visit_poly_trait_ref(&mut self, t: &'ast PolyTraitRef)
fn visit_variant_data(&mut self, s: &'ast VariantData)
fn visit_enum_def(&mut self, enum_definition: &'ast EnumDef)
fn visit_label(&mut self, label: &'ast Label)
fn visit_lifetime(&mut self, lifetime: &'ast Lifetime, LifetimeCtxt)
fn visit_mac_call(&mut self, mac: &'ast MacCall)
fn visit_mac_def(&mut self, _mac: &'ast MacroDef, _id: NodeId)
fn visit_path(&mut self, path: &'ast Path, _id: NodeId)
fn visit_use_tree(&mut self, use_tree: &'ast UseTree, id: NodeId, _nested: bool)
fn visit_path_segment(&mut self, path_segment: &'ast PathSegment)
fn visit_generic_args(&mut self, generic_args: &'ast GenericArgs)
fn visit_generic_arg(&mut self, generic_arg: &'ast GenericArg)
fn visit_assoc_constraint(&mut self, constraint: &'ast AssocConstraint)
fn visit_attribute(&mut self, attr: &'ast Attribute)
fn visit_vis(&mut self, vis: &'ast Visibility)
fn visit_fn_ret_ty(&mut self, ret_ty: &'ast FnRetTy)
fn visit_fn_header(&mut self, _header: &'ast FnHeader)
fn visit_expr_field(&mut self, f: &'ast ExprField)
fn visit_pat_field(&mut self, fp: &'ast PatField)
fn visit_crate(&mut self, krate: &'ast Crate)
fn visit_inline_asm(&mut self, asm: &'ast InlineAsm)
fn visit_inline_asm_sym(&mut self, sym: &'ast InlineAsmSym)
Auto Trait Implementations
impl<'r, 'ra> !RefUnwindSafe for EarlyDocLinkResolver<'r, 'ra>
impl<'r, 'ra> !Send for EarlyDocLinkResolver<'r, 'ra>
impl<'r, 'ra> !Sync for EarlyDocLinkResolver<'r, 'ra>
impl<'r, 'ra> Unpin for EarlyDocLinkResolver<'r, 'ra>where
'ra: 'r,
impl<'r, 'ra> !UnwindSafe for EarlyDocLinkResolver<'r, 'ra>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 272 bytes