convert type-check constraints into NLL constraints on the fly

We used to accumulate a vector of type-check constraints, but now we
generate them as we go, and just store the NLL-style
`OutlivesConstraint` and `TypeTest` information.
This commit is contained in:
Niko Matsakis 2018-06-05 11:06:38 -04:00
parent ba6a7f7500
commit 6a5a4874a0
7 changed files with 343 additions and 270 deletions

View file

@ -367,6 +367,11 @@ impl<I: Idx, T> IndexVec<I, T> {
IndexVec { raw: Vec::new(), _marker: PhantomData }
}
#[inline]
pub fn from_raw(raw: Vec<T>) -> Self {
IndexVec { raw, _marker: PhantomData }
}
#[inline]
pub fn with_capacity(capacity: usize) -> Self {
IndexVec { raw: Vec::with_capacity(capacity), _marker: PhantomData }