Skip to main content Module types Copy item path Source use std::fmt::Write ; π use std::hash::Hash ; π use std::hash::Hash ; π use std::path::PathBuf ; π use std::sync::Arc ; π use std::sync::OnceLock as OnceCell; π use std::fmt ; π use std::iter ; π use arrayvec::ArrayVec ; π use itertools::Either ; π use rustc_abi::ExternAbi; π use rustc_abi::VariantIdx; π use rustc_ast as ast; π use rustc_attr_ir::lang_items::LangItem; π use rustc_attr_ir::AttributeKind; π use rustc_attr_ir::ConstStability; π use rustc_attr_ir::DeprecatedSince; π use rustc_attr_ir::Deprecation; π use rustc_attr_ir::DocAttribute; π use rustc_attr_ir::Stability; π use rustc_attr_ir::StableSince; π use rustc_attr_ir::find_attr; π use rustc_data_structures::fx::FxHashSet; π use rustc_data_structures::fx::FxIndexMap; π use rustc_data_structures::fx::FxIndexSet; π use rustc_data_structures::thin_vec::ThinVec; π use rustc_hir as hir; π use rustc_hir::def::CtorKind; π use rustc_hir::def::DefKind; π use rustc_hir::def::MacroKinds; π use rustc_hir::def::Res; π use rustc_hir::def_id::CrateNum; π use rustc_hir::def_id::DefId; π use rustc_hir::def_id::LOCAL_CRATE; π use rustc_hir::def_id::LocalDefId; π use rustc_hir::BodyId; π use rustc_hir::Mutability; π use rustc_index::IndexVec; π use rustc_metadata::rendered_const; π use rustc_middle::ty::fast_reject::SimplifiedType; π use rustc_middle::ty; π use rustc_middle::ty::Ty; π use rustc_middle::ty::TyCtxt; π use rustc_middle::ty::Visibility; π use rustc_resolve::rustdoc::DocFragment; π use rustc_resolve::rustdoc::add_doc_fragment; π use rustc_resolve::rustdoc::attrs_to_doc_fragments; π use rustc_resolve::rustdoc::span_of_fragments; π use rustc_session::Session; π use rustc_span::def_id::CRATE_DEF_ID; π use rustc_span::def_id::ModId; π use rustc_span::hygiene::MacroKind; π use rustc_span::symbol::Symbol; π use rustc_span::symbol::kw; π use rustc_span::symbol::sym; π use rustc_span::DUMMY_SP; π use rustc_span::FileName; π use rustc_span::Ident; π use rustc_span::Loc; π use rustc_span::RemapPathScopeComponents; π use rustc_span::span_bug; π use tracing::debug; π use tracing::trace; π pub(crate) use self::Type::Array ; π pub(crate) use self::Type::BareFunction ; π pub(crate) use self::Type::BorrowedRef ; π pub(crate) use self::Type::DynTrait ; π pub(crate) use self::Type::Generic ; π pub(crate) use self::Type::ImplTrait ; π pub(crate) use self::Type::Infer ; π pub(crate) use self::Type::Primitive ; π pub(crate) use self::Type::QPath ; π pub(crate) use self::Type::RawPointer ; π pub(crate) use self::Type::SelfTy ; π pub(crate) use self::Type::Slice ; π pub(crate) use self::Type::Tuple ; π pub(crate) use self::Type::UnsafeBinder ; π use crate::clean::cfg::Cfg ; π use crate::clean::clean_middle_path ; π use crate::clean::inline ; π use crate::clean::inline::print_inlined_const ; π use crate::clean::utils::is_literal_expr ; π use crate::clean::utils::print_evaluated_const ; π use crate::core::DocContext ; π use crate::formats::cache::Cache ; π use crate::formats::item_type::ItemType ; π use crate::html::format::HrefInfo ; π use crate::html::render::Context ; π use crate::passes::collect_intra_doc_links::UrlFragment ; π size_asserts π AliasedType π AssocConstant π AssocFunction π AssocItemConstraint π A constraint on an associated item. AssocType π Attributes π The attributes on an Item , including attributes like #[derive(...)] and #[inline],
as well as doc comments. BareFunctionDecl π Constant π Crate π The crate currently being documented. DeclMacro π Discriminant π Enum π ExternalCrate π FnDecl π Function π GenericParamDef π Generics π Impl π Import π ImportSource π Item π Anything with a source location and set of attributes and, optionally, a
name. That is, anything that can be documented. This doesnβt correspond
directly to the ASTβs concept of an item; itβs a strict superset. ItemInner π ItemLink π A link that has not yet been rendered. Lifetime π Module π Parameter π A function parameter. Path π PathSegment π PolyTrait π A trait reference, which may have higher ranked lifetimes. ProcMacro π QPathData π RenderedLink Span π Small wrapper around [rustc_span::Span] that adds helper methods
and enforces calling [rustc_span::Span::source_callsite()]. Static π Struct π Trait π TraitAlias π TypeAlias π Union π UnsafeBinderTy π Variant π VariantStruct π This is a more limited form of the standard Struct, different in that
it lacks the things most items have (name, id, parameterization). Found
only as a variant in an enum. AssocItemConstraintKind π The kind of associated item constraint . ConstantExpr π Defaultness π ExternalLocation π Indicates where an external crate can be found. GenericArg π GenericArgs π GenericBound π GenericParamDefKind π ImplKind π ImportKind π ItemId π ItemKind π PreciseCapturingArg π PrimitiveType π A primitive (aka, builtin) type. Term π Type π Rustdocβs representation of types, mostly based on the [hir::Ty]. TypeAliasInnerType π VariantKind π WherePredicate π is_field_vis_inherited π rustc_span π ItemIdSet π SimplifiedTypes π