Skip to content

Commit

Permalink
Tweek best_blame_constraint to slightly prefer specific explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjasper committed Aug 14, 2018
1 parent 7710d95 commit 372e4ae
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -124,13 +124,15 @@ impl<'tcx> RegionInferenceContext<'tcx> {
let constraint = &self.constraints[path[i]];

let constraint_sup_scc = self.constraint_sccs.scc(constraint.sup);
if constraint_sup_scc == target_scc {
return false;
}

match categorized_path[i].0 {
ConstraintCategory::Boring => false,
_ => true,
ConstraintCategory::Other => {
// other isn't interesting when the two lifetimes
// are unified.
constraint_sup_scc != self.constraint_sccs.scc(constraint.sub)
}
_ => constraint_sup_scc != target_scc,
}
});
if let Some(i) = best_choice {
Expand Down

0 comments on commit 372e4ae

Please sign in to comment.