Eliminate ObligationCauseData
.
This makes `Obligation` two words bigger, but avoids allocating a lot of the time. I previously tried this in #73983 and it didn't help much, but local timings look more promising now.
This commit is contained in:
parent
e95e084a14
commit
f09b1facd0
22 changed files with 135 additions and 139 deletions
|
@ -232,7 +232,7 @@ pub fn predicates_for_generics<'tcx>(
|
|||
debug!("predicates_for_generics(generic_bounds={:?})", generic_bounds);
|
||||
|
||||
iter::zip(generic_bounds.predicates, generic_bounds.spans).map(move |(predicate, span)| {
|
||||
let cause = match cause.code {
|
||||
let cause = match *cause.code() {
|
||||
traits::ItemObligation(def_id) if !span.is_dummy() => traits::ObligationCause::new(
|
||||
cause.span,
|
||||
cause.body_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue