@@ -156,7 +156,7 @@ pub struct InferCtxtInner<'tcx> {
156
156
undo_log : InferCtxtUndoLogs < ' tcx > ,
157
157
158
158
/// Caches for opaque type inference.
159
- pub opaque_type_storage : OpaqueTypeStorage < ' tcx > ,
159
+ opaque_type_storage : OpaqueTypeStorage < ' tcx > ,
160
160
}
161
161
162
162
impl < ' tcx > InferCtxtInner < ' tcx > {
@@ -195,41 +195,17 @@ impl<'tcx> InferCtxtInner<'tcx> {
195
195
}
196
196
197
197
#[ inline]
198
- fn int_unification_table (
199
- & mut self ,
200
- ) -> ut:: UnificationTable <
201
- ut:: InPlace <
202
- ty:: IntVid ,
203
- & mut ut:: UnificationStorage < ty:: IntVid > ,
204
- & mut InferCtxtUndoLogs < ' tcx > ,
205
- > ,
206
- > {
198
+ fn int_unification_table ( & mut self ) -> UnificationTable < ' _ , ' tcx , ty:: IntVid > {
207
199
self . int_unification_storage . with_log ( & mut self . undo_log )
208
200
}
209
201
210
202
#[ inline]
211
- fn float_unification_table (
212
- & mut self ,
213
- ) -> ut:: UnificationTable <
214
- ut:: InPlace <
215
- ty:: FloatVid ,
216
- & mut ut:: UnificationStorage < ty:: FloatVid > ,
217
- & mut InferCtxtUndoLogs < ' tcx > ,
218
- > ,
219
- > {
203
+ fn float_unification_table ( & mut self ) -> UnificationTable < ' _ , ' tcx , ty:: FloatVid > {
220
204
self . float_unification_storage . with_log ( & mut self . undo_log )
221
205
}
222
206
223
207
#[ inline]
224
- fn const_unification_table (
225
- & mut self ,
226
- ) -> ut:: UnificationTable <
227
- ut:: InPlace <
228
- ty:: ConstVid < ' tcx > ,
229
- & mut ut:: UnificationStorage < ty:: ConstVid < ' tcx > > ,
230
- & mut InferCtxtUndoLogs < ' tcx > ,
231
- > ,
232
- > {
208
+ fn const_unification_table ( & mut self ) -> UnificationTable < ' _ , ' tcx , ty:: ConstVid < ' tcx > > {
233
209
self . const_unification_storage . with_log ( & mut self . undo_log )
234
210
}
235
211
@@ -1429,17 +1405,14 @@ impl<'tcx> InferCtxt<'tcx> {
1429
1405
}
1430
1406
}
1431
1407
1408
+ /// Attempts to resolve all type/region/const variables in
1409
+ /// `value`. Region inference must have been run already (e.g.,
1410
+ /// by calling `resolve_regions_and_report_errors`). If some
1411
+ /// variable was never unified, an `Err` results.
1412
+ ///
1413
+ /// This method is idempotent, but it not typically not invoked
1414
+ /// except during the writeback phase.
1432
1415
pub fn fully_resolve < T : TypeFoldable < TyCtxt < ' tcx > > > ( & self , value : T ) -> FixupResult < ' tcx , T > {
1433
- /*!
1434
- * Attempts to resolve all type/region/const variables in
1435
- * `value`. Region inference must have been run already (e.g.,
1436
- * by calling `resolve_regions_and_report_errors`). If some
1437
- * variable was never unified, an `Err` results.
1438
- *
1439
- * This method is idempotent, but it not typically not invoked
1440
- * except during the writeback phase.
1441
- */
1442
-
1443
1416
let value = resolve:: fully_resolve ( self , value) ;
1444
1417
assert ! (
1445
1418
value. as_ref( ) . map_or( true , |value| !value. needs_infer( ) ) ,
@@ -1754,7 +1727,6 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
1754
1727
// in this case. The typechecker should only ever report type errors involving mismatched
1755
1728
// types using one of these methods, and should not call span_err directly for such
1756
1729
// errors.
1757
-
1758
1730
pub fn type_error_struct_with_diag < M > (
1759
1731
& self ,
1760
1732
sp : Span ,
0 commit comments