Change implementation of syntax::util::SmallVector to use data_structures::SmallVec.

This commit is contained in:
Mark-Simulacrum 2016-11-02 22:33:35 -06:00
parent 4da129d984
commit 7bbebb1f54
15 changed files with 575 additions and 288 deletions

View file

@ -184,7 +184,7 @@ impl<'infcx, 'gcx, 'tcx> CombineFields<'infcx, 'gcx, 'tcx> {
{
// We use SmallVector here instead of Vec because this code is hot and
// it's rare that the stack length exceeds 1.
let mut stack = SmallVector::zero();
let mut stack = SmallVector::new();
stack.push((a_ty, dir, b_vid));
loop {
// For each turn of the loop, we extract a tuple