11
11
12
12
#![ allow( rustc:: usage_of_ty_tykind) ]
13
13
14
- pub use self :: fold:: { FallibleTypeFolder , TypeFoldable , TypeFolder , TypeSuperFoldable } ;
15
- pub use self :: visit:: { TypeSuperVisitable , TypeVisitable , TypeVisitableExt , TypeVisitor } ;
16
- pub use self :: AssocItemContainer :: * ;
17
- pub use self :: BorrowKind :: * ;
18
- pub use self :: IntVarValue :: * ;
19
- pub use self :: Variance :: * ;
20
- use crate :: error:: TypeMismatchReason ;
21
- use crate :: mir:: { Body , GeneratorLayout } ;
22
- use crate :: ty;
23
- use crate :: ty:: fast_reject:: SimplifiedType ;
24
- use crate :: ty:: util:: Discr ;
25
- pub use adt:: * ;
26
- pub use assoc:: * ;
27
- pub use generics:: * ;
28
14
use rustc_ast as ast;
29
15
use rustc_attr as attr;
30
16
use rustc_data_structures:: intern:: Interned ;
@@ -34,58 +20,17 @@ use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res};
34
20
use rustc_hir:: def_id:: { DefId , LocalDefId } ;
35
21
use rustc_hir:: Node ;
36
22
use rustc_serialize:: { Decodable , Encodable } ;
37
- pub use rustc_session:: lint:: RegisteredTools ;
38
23
use rustc_span:: hygiene:: MacroKind ;
39
24
use rustc_span:: symbol:: { sym, Ident , Symbol } ;
40
25
use rustc_span:: { ExpnKind , Span } ;
41
26
use rustc_target:: abi:: { Align , FieldIdx , Integer , IntegerType , VariantIdx } ;
42
- pub use rustc_target:: abi:: { ReprFlags , ReprOptions } ;
43
27
use rustc_type_ir:: WithCachedTypeInfo ;
44
- pub use subst:: * ;
45
- pub use vtable:: * ;
46
-
47
- pub use crate :: ty:: diagnostics:: * ;
48
- pub use rustc_type_ir:: AliasKind :: * ;
49
- pub use rustc_type_ir:: DynKind :: * ;
50
- pub use rustc_type_ir:: InferTy :: * ;
51
- pub use rustc_type_ir:: RegionKind :: * ;
52
- pub use rustc_type_ir:: TyKind :: * ;
53
- pub use rustc_type_ir:: * ;
54
28
55
- pub use self :: binding:: BindingMode ;
56
- pub use self :: binding:: BindingMode :: * ;
57
- pub use self :: closure:: {
58
- is_ancestor_or_same_capture, place_to_string_for_capture, BorrowKind , CaptureInfo ,
59
- CapturedPlace , ClosureKind , ClosureTypeInfo , MinCaptureInformationMap , MinCaptureList ,
60
- RootVariableMinCaptureList , UpvarCapture , UpvarCaptureMap , UpvarId , UpvarListMap , UpvarPath ,
61
- CAPTURE_STRUCT_LOCAL ,
62
- } ;
63
- pub use self :: consts:: {
64
- Const , ConstData , ConstInt , ConstKind , Expr , InferConst , ScalarInt , UnevaluatedConst , ValTree ,
65
- } ;
66
- pub use self :: context:: {
67
- tls, CtxtInterners , DeducedParamAttrs , FreeRegionInfo , GlobalCtxt , Lift , TyCtxt , TyCtxtFeed ,
68
- } ;
69
- pub use self :: instance:: { Instance , InstanceDef , ShortInstance , UnusedGenericParams } ;
70
- pub use self :: list:: List ;
71
- pub use self :: parameterized:: ParameterizedOverTcx ;
72
- pub use self :: rvalue_scopes:: RvalueScopes ;
73
- pub use self :: sty:: BoundRegionKind :: * ;
74
- pub use self :: sty:: {
75
- AliasTy , Article , Binder , BoundRegion , BoundRegionKind , BoundTy , BoundTyKind , BoundVar ,
76
- BoundVariableKind , CanonicalPolyFnSig , ClosureSubsts , ClosureSubstsParts , ConstVid ,
77
- EarlyBoundRegion , ExistentialPredicate , ExistentialProjection , ExistentialTraitRef , FnSig ,
78
- FreeRegion , GenSig , GeneratorSubsts , GeneratorSubstsParts , InlineConstSubsts ,
79
- InlineConstSubstsParts , ParamConst , ParamTy , PolyExistentialPredicate ,
80
- PolyExistentialProjection , PolyExistentialTraitRef , PolyFnSig , PolyGenSig , PolyTraitRef ,
81
- Region , RegionKind , RegionVid , TraitRef , TyKind , TypeAndMut , UpvarSubsts , VarianceDiagInfo ,
82
- } ;
83
- pub use self :: trait_def:: TraitDef ;
84
- pub use self :: typeck_results:: {
85
- CanonicalUserType , CanonicalUserTypeAnnotation , CanonicalUserTypeAnnotations ,
86
- GeneratorDiagnosticData , GeneratorInteriorTypeCause , TypeckResults , UserType ,
87
- UserTypeAnnotationIndex ,
88
- } ;
29
+ use self :: fast_reject:: SimplifiedType ;
30
+ use self :: util:: Discr ;
31
+ use crate :: error:: TypeMismatchReason ;
32
+ use crate :: mir:: { Body , GeneratorLayout } ;
33
+ use crate :: ty;
89
34
90
35
pub mod _match;
91
36
pub mod abstract_const;
@@ -111,90 +56,144 @@ pub mod vtable;
111
56
pub mod walk;
112
57
113
58
mod adt;
114
- mod assoc;
115
- mod closure;
116
- mod consts;
117
- mod context;
118
- mod diagnostics;
119
- mod erase_regions;
120
- mod generics;
121
- mod impls_ty;
122
- mod instance;
123
- mod list;
124
- mod opaque_types;
125
- mod parameterized;
126
- mod rvalue_scopes;
127
- mod structural_impls;
128
- mod sty;
129
- mod typeck_results;
130
-
131
59
mod alias_relation_direction;
60
+ mod assoc;
132
61
mod bound_const;
133
62
mod bound_constness;
134
63
mod c_reader_cache_key;
64
+ mod closure;
135
65
mod closure_size_profile_data;
66
+ mod consts;
67
+ mod context;
136
68
mod crate_inherent_impls;
137
69
mod crate_variances_map;
138
70
mod destructor;
139
71
mod destructured_const;
72
+ mod diagnostics;
73
+ mod erase_regions;
140
74
mod field_def;
75
+ mod generics;
141
76
mod impl_header;
142
77
mod impl_overlap_kind;
143
78
mod impl_polarity;
144
79
mod impl_subject;
145
80
mod impl_trait_in_trait_data;
81
+ mod impls_ty;
146
82
mod infer_var_info;
83
+ mod instance;
84
+ mod list;
147
85
mod main_definition;
148
86
mod opaque_hidden_type;
149
87
mod opaque_type_key;
88
+ mod opaque_types;
150
89
mod param_env;
90
+ mod parameterized;
151
91
mod placeholder;
152
92
mod predicate;
153
93
mod resolver_outputs;
94
+ mod rvalue_scopes;
95
+ mod structural_impls;
96
+ mod sty;
154
97
mod symbol_name;
155
98
mod term;
156
99
mod ty_; // FIXME: rename to `ty` once we don't import `crate::ty` here
100
+ mod typeck_results;
157
101
mod variant_def;
158
102
mod variant_discr;
159
103
mod variant_flags;
160
104
mod visibility;
161
105
162
- pub use alias_relation_direction:: AliasRelationDirection ;
163
- pub use bound_const:: BoundConst ;
164
- pub use bound_constness:: BoundConstness ;
165
- pub use c_reader_cache_key:: CReaderCacheKey ;
166
- pub use closure_size_profile_data:: ClosureSizeProfileData ;
167
- pub use crate_inherent_impls:: CrateInherentImpls ;
168
- pub use crate_variances_map:: CrateVariancesMap ;
169
- pub use destructor:: Destructor ;
170
- pub use destructured_const:: DestructuredConst ;
171
- pub use field_def:: FieldDef ;
172
- pub use impl_header:: ImplHeader ;
173
- pub use impl_overlap_kind:: ImplOverlapKind ;
174
- pub use impl_polarity:: ImplPolarity ;
175
- pub use impl_subject:: ImplSubject ;
176
- pub use impl_trait_in_trait_data:: ImplTraitInTraitData ;
177
- pub use infer_var_info:: InferVarInfo ;
178
- pub use main_definition:: MainDefinition ;
179
- pub use opaque_hidden_type:: OpaqueHiddenType ;
180
- pub use opaque_type_key:: OpaqueTypeKey ;
181
- pub use param_env:: { ParamEnv , ParamEnvAnd } ;
182
- pub use placeholder:: { Placeholder , PlaceholderConst , PlaceholderRegion , PlaceholderType } ;
183
- pub use predicate:: {
106
+ pub use rustc_session:: lint:: RegisteredTools ;
107
+ pub use rustc_target:: abi:: { ReprFlags , ReprOptions } ;
108
+ pub use rustc_type_ir:: AliasKind :: * ;
109
+ pub use rustc_type_ir:: DynKind :: * ;
110
+ pub use rustc_type_ir:: InferTy :: * ;
111
+ pub use rustc_type_ir:: RegionKind :: * ;
112
+ pub use rustc_type_ir:: TyKind :: * ;
113
+ pub use rustc_type_ir:: * ;
114
+
115
+ pub use self :: adt:: * ;
116
+ pub use self :: alias_relation_direction:: AliasRelationDirection ;
117
+ pub use self :: assoc:: * ;
118
+ pub use self :: binding:: BindingMode ;
119
+ pub use self :: binding:: BindingMode :: * ;
120
+ pub use self :: bound_const:: BoundConst ;
121
+ pub use self :: bound_constness:: BoundConstness ;
122
+ pub use self :: c_reader_cache_key:: CReaderCacheKey ;
123
+ pub use self :: closure:: {
124
+ is_ancestor_or_same_capture, place_to_string_for_capture, BorrowKind , CaptureInfo ,
125
+ CapturedPlace , ClosureKind , ClosureTypeInfo , MinCaptureInformationMap , MinCaptureList ,
126
+ RootVariableMinCaptureList , UpvarCapture , UpvarCaptureMap , UpvarId , UpvarListMap , UpvarPath ,
127
+ CAPTURE_STRUCT_LOCAL ,
128
+ } ;
129
+ pub use self :: closure_size_profile_data:: ClosureSizeProfileData ;
130
+ pub use self :: consts:: {
131
+ Const , ConstData , ConstInt , ConstKind , Expr , InferConst , ScalarInt , UnevaluatedConst , ValTree ,
132
+ } ;
133
+ pub use self :: context:: {
134
+ tls, CtxtInterners , DeducedParamAttrs , FreeRegionInfo , GlobalCtxt , Lift , TyCtxt , TyCtxtFeed ,
135
+ } ;
136
+ pub use self :: crate_inherent_impls:: CrateInherentImpls ;
137
+ pub use self :: crate_variances_map:: CrateVariancesMap ;
138
+ pub use self :: destructor:: Destructor ;
139
+ pub use self :: destructured_const:: DestructuredConst ;
140
+ pub use self :: diagnostics:: * ;
141
+ pub use self :: field_def:: FieldDef ;
142
+ pub use self :: fold:: { FallibleTypeFolder , TypeFoldable , TypeFolder , TypeSuperFoldable } ;
143
+ pub use self :: generics:: * ;
144
+ pub use self :: impl_header:: ImplHeader ;
145
+ pub use self :: impl_overlap_kind:: ImplOverlapKind ;
146
+ pub use self :: impl_polarity:: ImplPolarity ;
147
+ pub use self :: impl_subject:: ImplSubject ;
148
+ pub use self :: impl_trait_in_trait_data:: ImplTraitInTraitData ;
149
+ pub use self :: infer_var_info:: InferVarInfo ;
150
+ pub use self :: instance:: { Instance , InstanceDef , ShortInstance , UnusedGenericParams } ;
151
+ pub use self :: list:: List ;
152
+ pub use self :: main_definition:: MainDefinition ;
153
+ pub use self :: opaque_hidden_type:: OpaqueHiddenType ;
154
+ pub use self :: opaque_type_key:: OpaqueTypeKey ;
155
+ pub use self :: param_env:: { ParamEnv , ParamEnvAnd } ;
156
+ pub use self :: parameterized:: ParameterizedOverTcx ;
157
+ pub use self :: placeholder:: { Placeholder , PlaceholderConst , PlaceholderRegion , PlaceholderType } ;
158
+ pub use self :: predicate:: {
184
159
Clause , CoercePredicate , CratePredicatesMap , InstantiatedPredicates , OutlivesPredicate ,
185
160
PolyCoercePredicate , PolyProjectionPredicate , PolyRegionOutlivesPredicate ,
186
161
PolySubtypePredicate , PolyTraitPredicate , PolyTypeOutlivesPredicate , Predicate , PredicateKind ,
187
162
ProjectionPredicate , RegionOutlivesPredicate , SubtypePredicate , ToPredicate , TraitPredicate ,
188
163
TypeOutlivesPredicate ,
189
164
} ;
190
- pub use resolver_outputs:: { ResolverAstLowering , ResolverGlobalCtxt , ResolverOutputs } ;
191
- pub use symbol_name:: SymbolName ;
192
- pub use term:: { Term , TermKind } ;
193
- pub use ty_:: Ty ;
194
- pub use variant_def:: VariantDef ;
195
- pub use variant_discr:: VariantDiscr ;
196
- pub use variant_flags:: VariantFlags ;
197
- pub use visibility:: Visibility ;
165
+ pub use self :: resolver_outputs:: { ResolverAstLowering , ResolverGlobalCtxt , ResolverOutputs } ;
166
+ pub use self :: rvalue_scopes:: RvalueScopes ;
167
+ pub use self :: sty:: BoundRegionKind :: * ;
168
+ pub use self :: sty:: {
169
+ AliasTy , Article , Binder , BoundRegion , BoundRegionKind , BoundTy , BoundTyKind , BoundVar ,
170
+ BoundVariableKind , CanonicalPolyFnSig , ClosureSubsts , ClosureSubstsParts , ConstVid ,
171
+ EarlyBoundRegion , ExistentialPredicate , ExistentialProjection , ExistentialTraitRef , FnSig ,
172
+ FreeRegion , GenSig , GeneratorSubsts , GeneratorSubstsParts , InlineConstSubsts ,
173
+ InlineConstSubstsParts , ParamConst , ParamTy , PolyExistentialPredicate ,
174
+ PolyExistentialProjection , PolyExistentialTraitRef , PolyFnSig , PolyGenSig , PolyTraitRef ,
175
+ Region , RegionKind , RegionVid , TraitRef , TyKind , TypeAndMut , UpvarSubsts , VarianceDiagInfo ,
176
+ } ;
177
+ pub use self :: subst:: * ;
178
+ pub use self :: symbol_name:: SymbolName ;
179
+ pub use self :: term:: { Term , TermKind } ;
180
+ pub use self :: trait_def:: TraitDef ;
181
+ pub use self :: ty_:: Ty ;
182
+ pub use self :: typeck_results:: {
183
+ CanonicalUserType , CanonicalUserTypeAnnotation , CanonicalUserTypeAnnotations ,
184
+ GeneratorDiagnosticData , GeneratorInteriorTypeCause , TypeckResults , UserType ,
185
+ UserTypeAnnotationIndex ,
186
+ } ;
187
+ pub use self :: variant_def:: VariantDef ;
188
+ pub use self :: variant_discr:: VariantDiscr ;
189
+ pub use self :: variant_flags:: VariantFlags ;
190
+ pub use self :: visibility:: Visibility ;
191
+ pub use self :: visit:: { TypeSuperVisitable , TypeVisitable , TypeVisitableExt , TypeVisitor } ;
192
+ pub use self :: vtable:: * ;
193
+ pub use self :: AssocItemContainer :: * ;
194
+ pub use self :: BorrowKind :: * ;
195
+ pub use self :: IntVarValue :: * ;
196
+ pub use self :: Variance :: * ;
198
197
199
198
impl TyCtxt < ' _ > {
200
199
#[ inline]
0 commit comments