1
Fork 0

Utilize AccumulateVec to avoid heap allocations in mk_{substs, type_list, tup} calls.

This commit is contained in:
Mark-Simulacrum 2016-10-24 18:23:29 -06:00
parent a4f7ba376e
commit 982a48575b
35 changed files with 193 additions and 144 deletions

View file

@ -670,7 +670,7 @@ impl Clean<TyParamBound> for ty::BuiltinBound {
Some(tcx) => tcx,
None => return RegionBound(Lifetime::statik())
};
let empty = Substs::empty(tcx);
let empty = tcx.intern_substs(&[]);
let (did, path) = match *self {
ty::BoundSend =>
(tcx.lang_items.send_trait().unwrap(),