Module rustdoc::clean [−][src]
This module contains the "cleaned" pieces of the AST, and the functions that clean them.
Re-exports
pub use self::Type::*; |
pub use self::Mutability::*; |
pub use self::ItemEnum::*; |
pub use self::TyParamBound::*; |
pub use self::SelfTy::*; |
pub use self::FunctionRetTy::*; |
pub use self::Visibility::Public; |
pub use self::Visibility::Inherited; |
use syntax; |
use rustc_target::spec::abi::Abi; |
use syntax::ast; |
use syntax::ast::AttrStyle; |
use syntax::ast::NodeId; |
use syntax::ast::Ident; |
use syntax::attr; |
use syntax::codemap::dummy_spanned; |
use syntax::codemap::Spanned; |
use syntax::feature_gate::UnstableFeatures; |
use syntax::ptr::P; |
use syntax::ptr::P; |
use syntax::symbol::keywords; |
use syntax::symbol::keywords::Keyword; |
use syntax::symbol::Symbol; |
use syntax::symbol::InternedString; |
use syntax_pos; |
use syntax_pos::DUMMY_SP; |
use syntax_pos::Pos; |
use syntax_pos::FileName; |
use rustc::middle::const_val::ConstVal; |
use rustc::middle::privacy::AccessLevels; |
use rustc::middle::resolve_lifetime as rl; |
use rustc::ty::fold::TypeFolder; |
use rustc::middle::lang_items; |
use rustc::mir::interpret::GlobalId; |
use rustc::hir; |
use rustc::hir::HirVec; |
use rustc::hir::def; |
use rustc::hir::def::Def; |
use rustc::hir::def::CtorKind; |
use rustc::hir::def_id::CrateNum; |
use rustc::hir::def_id::DefId; |
use rustc::hir::def_id::DefIndex; |
use rustc::hir::def_id::CRATE_DEF_INDEX; |
use rustc::hir::def_id::LOCAL_CRATE; |
use rustc::hir::def_id::DefIndexAddressSpace; |
use rustc::ty::subst::Substs; |
use rustc::ty; |
use rustc::ty::TyCtxt; |
use rustc::ty::Region; |
use rustc::ty::RegionVid; |
use rustc::ty::Ty; |
use rustc::ty::AdtKind; |
use rustc::ty::GenericParamCount; |
use rustc::middle::stability; |
use rustc::util::nodemap::FxHashMap; |
use rustc::util::nodemap::FxHashMap; |
use rustc::util::nodemap::FxHashSet; |
use rustc::util::nodemap::FxHashSet; |
use rustc_typeck::hir_ty_to_ty; |
use rustc::infer::region_constraints::RegionConstraintData; |
use rustc::infer::region_constraints::Constraint; |
use rustc::lint; |
use std::collections::hash_map::Entry; |
use std::fmt; |
use std::default::Default; |
use std::mem; |
use std::slice; |
use std::vec; |
use std::iter::FromIterator; |
use std::iter::once; |
use rustc_data_structures::sync::Lrc; |
use std::rc::Rc; |
use std::str::FromStr; |
use std::cell::RefCell; |
use std::sync::Arc; |
use std::u32; |
use std::ops::Range; |
use core; |
use core::DocContext; |
use doctree; |
use visit_ast; |
use html::render::cache; |
use html::render::ExternalLocation; |
use html::item_type::ItemType; |
use html::markdown::markdown_links; |
use self::cfg::Cfg; |
use self::auto_trait::AutoTraitFinder; |
Modules
auto_trait | |
cfg |
Representation of a |
inline |
Support for inlining external documentation into the current AST. |
simplify |
Simplification of where clauses and parameter bounds into a prettier and more canonical form. |
Structs
Argument | |
Arguments | |
Attributes | |
BareFunctionDecl | |
Constant | |
Crate | |
Deprecation | |
Enum | |
ExternalCrate | |
FnDecl | |
Function | |
Generics | |
Impl | |
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. |
Lifetime | |
ListAttributesIter | |
Macro | |
Method | |
Module | |
Path | |
PathSegment | |
PolyTrait |
A trait reference, which may have higher ranked lifetimes. |
RegionDeps | |
Span | |
Stability | |
Static | |
Struct | |
Trait | |
TyMethod | |
TyParam | |
TypeBinding |
An equality constraint on an associated type, e.g. |
Typedef | |
Union | |
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. |
Enums
AutoTraitResult | |
DocFragment |
A portion of documentation, extracted from a |
FunctionRetTy | |
GenericParamDef | |
ImplPolarity | |
Import | |
ItemEnum | |
Mutability | |
PathKind | |
PathParameters | |
PrimitiveType | |
RegionTarget | |
SelfTy | |
SimpleBound | |
TyParamBound | |
Type |
A representation of a Type suitable for hyperlinking purposes. Ideally one can get the original type out of the AST/TyCtxt given one of these, if more information is needed. Most importantly it does not preserve mutability or boxes. |
TypeKind | |
VariantKind | |
Visibility | |
WherePredicate |
Constants
FN_OUTPUT_NAME | |
MAX_DEF_ID | |
PRIMITIVES |
Traits
AttributesExt | |
Clean | |
GetDefId | |
NestedAttributesExt | |
ToSource |
Functions
ambiguity_error | |
build_deref_target_impls | |
def_id_to_path | |
enter_impl_trait | |
external_path | |
external_path_params | |
get_auto_traits_with_def_id | |
get_auto_traits_with_node_id | |
get_deprecation | |
get_path_for_type | |
get_stability | |
get_trait_def_id | |
handle_variant |
Given an enum variant's def, return the def of its enum and the associated fragment |
is_primitive | |
macro_resolve |
Resolve a string as a macro |
name_from_pat | |
path_to_def | |
path_to_def_local | |
print_const | |
print_const_expr | |
qpath_to_string | |
register_def | |
resolution_failure | |
resolve |
Resolve a given string as a path, along with whether or not it is in the value namespace. Also returns an optional URL fragment in the case of variants and methods |
resolve_type |
Given a type Path, resolve it to a Type using the TyCtxt |
resolve_use_source | |
span_of_attrs | |
strip_path | |
strip_type | |
type_ns_kind |
Given a def, returns its name, the article to be used, and a disambiguator for the type namespace |
value_ns_kind |
Given a def, returns its name and disambiguator for a value namespace |