|
1 | 1 | // ignore-tidy-filelength |
2 | 2 |
|
3 | | -//! This module contains the "cleaned" pieces of the AST, and the functions |
4 | | -//! that clean them. |
5 | | -
|
6 | | -pub mod inline; |
7 | | -pub mod cfg; |
8 | | -mod simplify; |
9 | | -mod auto_trait; |
10 | | -mod blanket_impl; |
| 3 | +use std::fmt; |
| 4 | +use std::hash::{Hash, Hasher}; |
| 5 | +use std::default::Default; |
| 6 | +use std::{slice, vec}; |
| 7 | +use std::num::NonZeroU32; |
| 8 | +use std::iter::FromIterator; |
| 9 | +use std::rc::Rc; |
| 10 | +use std::cell::RefCell; |
| 11 | +use std::sync::Arc; |
11 | 12 |
|
12 | | -use rustc_index::vec::{IndexVec, Idx}; |
13 | | -use rustc_target::spec::abi::Abi; |
14 | | -use rustc_typeck::hir_ty_to_ty; |
15 | | -use rustc::infer::region_constraints::{RegionConstraintData, Constraint}; |
16 | | -use rustc::middle::resolve_lifetime as rl; |
17 | 13 | use rustc::middle::lang_items; |
18 | 14 | use rustc::middle::stability; |
19 | | -use rustc::mir::interpret::GlobalId; |
20 | 15 | use rustc::hir; |
21 | | -use rustc::hir::def::{CtorKind, DefKind, Res}; |
22 | | -use rustc::hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE}; |
23 | | -use rustc::hir::ptr::P; |
24 | | -use rustc::ty::subst::{InternalSubsts, SubstsRef, GenericArgKind}; |
25 | | -use rustc::ty::{self, DefIdTree, TyCtxt, Region, RegionVid, Ty, AdtKind}; |
26 | | -use rustc::ty::fold::TypeFolder; |
| 16 | +use rustc::hir::def::Res; |
| 17 | +use rustc::hir::def_id::{CrateNum, DefId}; |
27 | 18 | use rustc::ty::layout::VariantIdx; |
28 | 19 | use rustc::util::nodemap::{FxHashMap, FxHashSet}; |
| 20 | +use rustc_index::vec::IndexVec; |
| 21 | +use rustc_target::spec::abi::Abi; |
29 | 22 | use syntax::ast::{self, Attribute, AttrStyle, AttrKind, Ident}; |
30 | 23 | use syntax::attr; |
31 | 24 | use syntax::util::comments; |
32 | 25 | use syntax::source_map::DUMMY_SP; |
33 | | -use syntax_pos::symbol::{Symbol, kw, sym}; |
34 | 26 | use syntax_pos::hygiene::MacroKind; |
35 | | -use syntax_pos::{self, Pos, FileName}; |
36 | | - |
37 | | -use std::collections::hash_map::Entry; |
38 | | -use std::fmt; |
39 | | -use std::hash::{Hash, Hasher}; |
40 | | -use std::default::Default; |
41 | | -use std::{mem, slice, vec}; |
42 | | -use std::num::NonZeroU32; |
43 | | -use std::iter::FromIterator; |
44 | | -use std::rc::Rc; |
45 | | -use std::cell::RefCell; |
46 | | -use std::sync::Arc; |
47 | | -use std::u32; |
48 | | - |
49 | | -use crate::core::{self, DocContext, ImplTraitParam}; |
| 27 | +use syntax_pos::symbol::{Symbol, sym}; |
| 28 | +use syntax_pos::{self, FileName}; |
| 29 | + |
| 30 | +use crate::core::DocContext; |
| 31 | +use crate::clean::cfg::Cfg; |
| 32 | +use crate::clean::inline; |
| 33 | +use crate::clean::external_path; |
| 34 | +use crate::clean::types::Type::{QPath, ResolvedPath}; |
50 | 35 | use crate::doctree; |
51 | | -use crate::html::render::{cache, ExternalLocation}; |
52 | 36 | use crate::html::item_type::ItemType; |
| 37 | +use crate::html::render::{cache, ExternalLocation}; |
53 | 38 |
|
54 | | - |
55 | | -use self::cfg::Cfg; |
56 | | -use self::auto_trait::AutoTraitFinder; |
57 | | -use self::blanket_impl::BlanketImplFinder; |
58 | | - |
59 | | -pub use self::Type::*; |
60 | | -pub use self::Mutability::*; |
61 | | -pub use self::ItemEnum::*; |
62 | | -pub use self::SelfTy::*; |
63 | | -pub use self::FunctionRetTy::*; |
64 | | -pub use self::Visibility::{Public, Inherited}; |
| 39 | +use self::Type::*; |
| 40 | +use self::ItemEnum::*; |
| 41 | +use self::SelfTy::*; |
| 42 | +use self::FunctionRetTy::*; |
65 | 43 |
|
66 | 44 | thread_local!(pub static MAX_DEF_ID: RefCell<FxHashMap<CrateNum, DefId>> = Default::default()); |
67 | 45 |
|
|
0 commit comments