@@ -24,8 +24,7 @@ use crate::ich::StableHashingContext;
2424use crate :: middle:: cstore:: CrateStoreDyn ;
2525use crate :: middle:: resolve_lifetime:: ObjectLifetimeDefault ;
2626use crate :: mir:: interpret:: ErrorHandled ;
27- use crate :: mir:: Body ;
28- use crate :: mir:: GeneratorLayout ;
27+ use crate :: mir:: { Body , GeneratorLayout } ;
2928use crate :: traits:: { self , Reveal } ;
3029use crate :: ty;
3130use crate :: ty:: subst:: { GenericArg , InternalSubsts , Subst , SubstsRef } ;
@@ -34,9 +33,7 @@ use rustc_ast as ast;
3433use rustc_attr as attr;
3534use rustc_data_structures:: captures:: Captures ;
3635use rustc_data_structures:: fingerprint:: Fingerprint ;
37- use rustc_data_structures:: fx:: FxHashMap ;
38- use rustc_data_structures:: fx:: FxHashSet ;
39- use rustc_data_structures:: fx:: FxIndexMap ;
36+ use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexMap } ;
4037use rustc_data_structures:: sorted_map:: SortedIndexMultiMap ;
4138use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
4239use rustc_data_structures:: sync:: { self , par_iter, ParallelIterator } ;
@@ -58,56 +55,42 @@ use rustc_target::abi::{Align, VariantIdx};
5855
5956use std:: cell:: RefCell ;
6057use std:: cmp:: Ordering ;
61- use std:: fmt;
6258use std:: hash:: { Hash , Hasher } ;
6359use std:: ops:: { ControlFlow , Range } ;
64- use std:: ptr;
65- use std:: str;
60+ use std:: { fmt, ptr, str} ;
6661
67- pub use self :: sty:: BoundRegionKind :: * ;
68- pub use self :: sty:: RegionKind ;
69- pub use self :: sty:: RegionKind :: * ;
70- pub use self :: sty:: TyKind :: * ;
71- pub use self :: sty:: { Binder , BoundTy , BoundTyKind , BoundVar } ;
72- pub use self :: sty:: { BoundRegion , BoundRegionKind , EarlyBoundRegion , FreeRegion , Region } ;
73- pub use self :: sty:: { CanonicalPolyFnSig , FnSig , GenSig , PolyFnSig , PolyGenSig } ;
74- pub use self :: sty:: { ClosureSubsts , GeneratorSubsts , TypeAndMut , UpvarSubsts } ;
75- pub use self :: sty:: { ClosureSubstsParts , GeneratorSubstsParts } ;
76- pub use self :: sty:: { ConstVid , RegionVid } ;
77- pub use self :: sty:: { ExistentialPredicate , ParamConst , ParamTy , ProjectionTy } ;
78- pub use self :: sty:: { ExistentialProjection , PolyExistentialProjection } ;
79- pub use self :: sty:: { ExistentialTraitRef , PolyExistentialTraitRef } ;
80- pub use self :: sty:: { PolyTraitRef , TraitRef , TyKind } ;
8162pub use crate :: ty:: diagnostics:: * ;
8263pub use rustc_type_ir:: InferTy :: * ;
8364pub use rustc_type_ir:: * ;
8465
8566pub use self :: binding:: BindingMode ;
8667pub use self :: binding:: BindingMode :: * ;
87-
88- pub use self :: context:: { tls, FreeRegionInfo , TyCtxt } ;
89- pub use self :: context:: {
90- CanonicalUserType , CanonicalUserTypeAnnotation , CanonicalUserTypeAnnotations ,
91- DelaySpanBugEmitted , ResolvedOpaqueTy , UserType , UserTypeAnnotationIndex ,
92- } ;
68+ pub use self :: consts:: { Const , ConstInt , ConstKind , InferConst , ScalarInt } ;
9369pub use self :: context:: {
94- CtxtInterners , GeneratorInteriorTypeCause , GlobalCtxt , Lift , TypeckResults ,
70+ tls, CanonicalUserType , CanonicalUserTypeAnnotation , CanonicalUserTypeAnnotations ,
71+ CtxtInterners , DelaySpanBugEmitted , FreeRegionInfo , GeneratorInteriorTypeCause , GlobalCtxt ,
72+ Lift , ResolvedOpaqueTy , TyCtxt , TypeckResults , UserType , UserTypeAnnotationIndex ,
9573} ;
96-
9774pub use self :: instance:: { Instance , InstanceDef } ;
98-
9975pub use self :: list:: List ;
100-
76+ pub use self :: sty:: BoundRegionKind :: * ;
77+ pub use self :: sty:: RegionKind :: * ;
78+ pub use self :: sty:: TyKind :: * ;
79+ pub use self :: sty:: {
80+ Binder , BoundRegion , BoundRegionKind , BoundTy , BoundTyKind , BoundVar , CanonicalPolyFnSig ,
81+ ClosureSubsts , ClosureSubstsParts , ConstVid , EarlyBoundRegion , ExistentialPredicate ,
82+ ExistentialProjection , ExistentialTraitRef , FnSig , FreeRegion , GenSig , GeneratorSubsts ,
83+ GeneratorSubstsParts , ParamConst , ParamTy , PolyExistentialProjection , PolyExistentialTraitRef ,
84+ PolyFnSig , PolyGenSig , PolyTraitRef , ProjectionTy , Region , RegionKind , RegionVid , TraitRef ,
85+ TyKind , TypeAndMut , UpvarSubsts ,
86+ } ;
10187pub use self :: trait_def:: TraitDef ;
10288
103- pub use self :: consts:: { Const , ConstInt , ConstKind , InferConst , ScalarInt } ;
104-
10589pub mod _match;
10690pub mod adjustment;
10791pub mod binding;
10892pub mod cast;
10993pub mod codec;
110- mod erase_regions;
11194pub mod error;
11295pub mod fast_reject;
11396pub mod flags;
@@ -127,6 +110,7 @@ pub mod walk;
127110mod consts;
128111mod context;
129112mod diagnostics;
113+ mod erase_regions;
130114mod instance;
131115mod list;
132116mod structural_impls;
0 commit comments