}
/// Borrows current value of the `region_bound_pairs`.
- pub fn region_bound_pairs(&self) -> &[(ty::Region<'tcx>, GenericKind<'tcx>)] {
+ pub fn region_bound_pairs(&self) -> &RegionBoundPairs<'tcx> {
&self.region_bound_pairs_accum
}
use hir::def_id::DefId;
use infer::{self, GenericKind, InferCtxt, RegionObligation, SubregionOrigin, VerifyBound};
+use infer::outlives::env::RegionBoundPairs;
use syntax::ast;
use traits::{self, ObligationCause};
use ty::outlives::Component;
/// processed.
pub fn process_registered_region_obligations(
&self,
- region_bound_pairs: &[(ty::Region<'tcx>, GenericKind<'tcx>)],
+ region_bound_pairs: &RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
param_env: ty::ParamEnv<'tcx>,
body_id: ast::NodeId,
/// registered in advance.
pub fn type_must_outlive(
&self,
- region_bound_pairs: &[(ty::Region<'tcx>, GenericKind<'tcx>)],
+ region_bound_pairs: &RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
param_env: ty::ParamEnv<'tcx>,
origin: infer::SubregionOrigin<'tcx>,
// of these fields.
delegate: D,
tcx: TyCtxt<'cx, 'gcx, 'tcx>,
- region_bound_pairs: &'cx [(ty::Region<'tcx>, GenericKind<'tcx>)],
+ region_bound_pairs: &'cx RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
param_env: ty::ParamEnv<'tcx>,
}
pub fn new(
delegate: D,
tcx: TyCtxt<'cx, 'gcx, 'tcx>,
- region_bound_pairs: &'cx [(ty::Region<'tcx>, GenericKind<'tcx>)],
+ region_bound_pairs: &'cx RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
param_env: ty::ParamEnv<'tcx>,
) -> Self {
.collect();
for id in body_ids {
- infcx.process_registered_region_obligations(&[], None, full_env.clone(), id);
+ infcx.process_registered_region_obligations(&vec![], None, full_env.clone(), id);
}
let region_data = infcx
use borrow_check::nll::type_check::Locations;
use borrow_check::nll::universal_regions::UniversalRegions;
use rustc::infer::canonical::QueryRegionConstraint;
+use rustc::infer::outlives::env::RegionBoundPairs;
use rustc::infer::outlives::obligations::{TypeOutlives, TypeOutlivesDelegate};
use rustc::infer::region_constraints::{GenericKind, VerifyBound};
use rustc::infer::{self, SubregionOrigin};
tcx: TyCtxt<'a, 'gcx, 'tcx>,
universal_regions: &'a UniversalRegions<'tcx>,
location_table: &'a LocationTable,
- region_bound_pairs: &'a [(ty::Region<'tcx>, GenericKind<'tcx>)],
+ region_bound_pairs: &'a RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
param_env: ty::ParamEnv<'tcx>,
locations: Locations,
tcx: TyCtxt<'a, 'gcx, 'tcx>,
universal_regions: &'a UniversalRegions<'tcx>,
location_table: &'a LocationTable,
- region_bound_pairs: &'a [(ty::Region<'tcx>, GenericKind<'tcx>)],
+ region_bound_pairs: &'a RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
param_env: ty::ParamEnv<'tcx>,
locations: Locations,
use rustc::hir;
use rustc::hir::def_id::DefId;
use rustc::infer::canonical::QueryRegionConstraint;
-use rustc::infer::region_constraints::GenericKind;
+use rustc::infer::outlives::env::RegionBoundPairs;
use rustc::infer::{InferCtxt, InferOk, LateBoundRegionConversionTime};
use rustc::mir::interpret::EvalErrorKind::BoundsCheck;
use rustc::mir::tcx::PlaceTy;
mir_def_id: DefId,
param_env: ty::ParamEnv<'gcx>,
mir: &'a Mir<'tcx>,
- region_bound_pairs: &'a [(ty::Region<'tcx>, GenericKind<'tcx>)],
+ region_bound_pairs: &'a RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
borrowck_context: Option<&'a mut BorrowCheckContext<'a, 'tcx>>,
universal_region_relations: Option<&'a UniversalRegionRelations<'tcx>>,
last_span: Span,
mir: &'a Mir<'tcx>,
mir_def_id: DefId,
- region_bound_pairs: &'a [(ty::Region<'tcx>, GenericKind<'tcx>)],
+ region_bound_pairs: &'a RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
reported_errors: FxHashSet<(Ty<'tcx>, Span)>,
borrowck_context: Option<&'a mut BorrowCheckContext<'a, 'tcx>>,
mir: &'a Mir<'tcx>,
mir_def_id: DefId,
param_env: ty::ParamEnv<'gcx>,
- region_bound_pairs: &'a [(ty::Region<'tcx>, GenericKind<'tcx>)],
+ region_bound_pairs: &'a RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
borrowck_context: Option<&'a mut BorrowCheckContext<'a, 'tcx>>,
universal_region_relations: Option<&'a UniversalRegionRelations<'tcx>>,
def_id,
param_env,
mir,
- &[],
+ &vec![],
None,
None,
None,