|
1 | 1 | use rustc_data_structures::frozen::Frozen;
|
2 | 2 | use rustc_data_structures::transitive_relation::TransitiveRelation;
|
3 | 3 | use rustc_infer::infer::canonical::QueryRegionConstraints;
|
4 |
| -use rustc_infer::infer::free_regions::FreeRegionRelations; |
5 | 4 | use rustc_infer::infer::outlives;
|
6 | 5 | use rustc_infer::infer::region_constraints::GenericKind;
|
7 | 6 | use rustc_infer::infer::InferCtxt;
|
8 | 7 | use rustc_middle::mir::ConstraintCategory;
|
9 | 8 | use rustc_middle::traits::query::OutlivesBound;
|
10 |
| -use rustc_middle::ty::{self, RegionVid, Ty, TyCtxt}; |
| 9 | +use rustc_middle::ty::{self, RegionVid, Ty}; |
11 | 10 | use rustc_span::DUMMY_SP;
|
12 | 11 | use rustc_trait_selection::traits::query::type_op::{self, TypeOp};
|
13 | 12 | use std::rc::Rc;
|
14 | 13 | use type_op::TypeOpOutput;
|
15 | 14 |
|
16 | 15 | use crate::{
|
17 |
| - nll::ToRegionVid, |
18 | 16 | type_check::constraint_conversion,
|
19 | 17 | type_check::{Locations, MirTypeckRegionConstraints},
|
20 | 18 | universal_regions::UniversalRegions,
|
@@ -383,21 +381,3 @@ impl UniversalRegionRelationsBuilder<'cx, 'tcx> {
|
383 | 381 | }
|
384 | 382 | }
|
385 | 383 | }
|
386 |
| - |
387 |
| -/// This trait is used by the `impl-trait` constraint code to abstract |
388 |
| -/// over the `FreeRegionMap` from lexical regions and |
389 |
| -/// `UniversalRegions` (from NLL)`. |
390 |
| -impl<'tcx> FreeRegionRelations<'tcx> for UniversalRegionRelations<'tcx> { |
391 |
| - fn sub_free_regions( |
392 |
| - &self, |
393 |
| - _tcx: TyCtxt<'tcx>, |
394 |
| - shorter: ty::Region<'tcx>, |
395 |
| - longer: ty::Region<'tcx>, |
396 |
| - ) -> bool { |
397 |
| - let shorter = shorter.to_region_vid(); |
398 |
| - assert!(self.universal_regions.is_universal_region(shorter)); |
399 |
| - let longer = longer.to_region_vid(); |
400 |
| - assert!(self.universal_regions.is_universal_region(longer)); |
401 |
| - self.outlives(longer, shorter) |
402 |
| - } |
403 |
| -} |
0 commit comments