put the RegionConstraintData
into an Rc
This commit is contained in:
parent
8825f42a07
commit
7ff89805fe
@ -88,7 +88,7 @@ impl<'cx, 'tcx> SubtypeConstraintGenerator<'cx, 'tcx> {
|
||||
constraints,
|
||||
verifys,
|
||||
givens,
|
||||
} = data;
|
||||
} = &**data;
|
||||
|
||||
let span = self.mir
|
||||
.source_info(locations.from_location().unwrap_or(Location::START))
|
||||
|
@ -30,6 +30,7 @@ use rustc::ty::error::TypeError;
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::{self, ToPolyTraitRef, Ty, TyCtxt, TypeVariants};
|
||||
use std::fmt;
|
||||
use std::rc::Rc;
|
||||
use syntax::ast;
|
||||
use syntax_pos::{Span, DUMMY_SP};
|
||||
use transform::{MirPass, MirSource};
|
||||
@ -616,7 +617,7 @@ pub struct OutlivesSet<'tcx> {
|
||||
/// Constraints generated. In terms of the NLL RFC, when you have
|
||||
/// a constraint `R1: R2 @ P`, the data in there specifies things
|
||||
/// like `R1: R2`.
|
||||
pub data: RegionConstraintData<'tcx>,
|
||||
pub data: Rc<RegionConstraintData<'tcx>>,
|
||||
}
|
||||
|
||||
/// The `Locations` type summarizes *where* region constraints are
|
||||
@ -749,6 +750,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
|
||||
"fully_perform_op: constraints generated at {:?} are {:#?}",
|
||||
locations, data
|
||||
);
|
||||
let data = Rc::new(data);
|
||||
self.constraints
|
||||
.outlives_sets
|
||||
.push(OutlivesSet { locations, data });
|
||||
|
Loading…
Reference in New Issue
Block a user