|
9 | 9 | // except according to those terms.
|
10 | 10 |
|
11 | 11 | use CrateCtxt;
|
12 |
| -use check::regionck::{self, Rcx}; |
| 12 | +use check::regionck::RegionCtxt; |
13 | 13 |
|
14 | 14 | use hir::def_id::DefId;
|
15 | 15 | use middle::free_region::FreeRegionMap;
|
@@ -274,7 +274,7 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'a, 'tcx>(
|
274 | 274 | /// ensuring that they do not access data nor invoke methods of
|
275 | 275 | /// values that have been previously dropped).
|
276 | 276 | ///
|
277 |
| -pub fn check_safety_of_destructor_if_necessary<'a, 'tcx>(rcx: &mut Rcx<'a, 'tcx>, |
| 277 | +pub fn check_safety_of_destructor_if_necessary<'a, 'tcx>(rcx: &mut RegionCtxt<'a, 'tcx>, |
278 | 278 | typ: ty::Ty<'tcx>,
|
279 | 279 | span: Span,
|
280 | 280 | scope: region::CodeExtent) {
|
@@ -344,7 +344,7 @@ enum TypeContext {
|
344 | 344 | }
|
345 | 345 |
|
346 | 346 | struct DropckContext<'a, 'b: 'a, 'tcx: 'b> {
|
347 |
| - rcx: &'a mut Rcx<'b, 'tcx>, |
| 347 | + rcx: &'a mut RegionCtxt<'b, 'tcx>, |
348 | 348 | /// types that have already been traversed
|
349 | 349 | breadcrumbs: FnvHashSet<Ty<'tcx>>,
|
350 | 350 | /// span for error reporting
|
@@ -416,10 +416,8 @@ fn iterate_over_potentially_unsafe_regions_in_type<'a, 'b, 'tcx>(
|
416 | 416 | (0..depth).map(|_| ' ').collect::<String>(),
|
417 | 417 | ty);
|
418 | 418 |
|
419 |
| - regionck::type_must_outlive(cx.rcx, |
420 |
| - infer::SubregionOrigin::SafeDestructor(cx.span), |
421 |
| - ty, |
422 |
| - ty::ReScope(cx.parent_scope)); |
| 419 | + cx.rcx.type_must_outlive(infer::SubregionOrigin::SafeDestructor(cx.span), |
| 420 | + ty, ty::ReScope(cx.parent_scope)); |
423 | 421 |
|
424 | 422 | return Ok(());
|
425 | 423 | }
|
|
0 commit comments