mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Tweek best_blame_constraint to slightly prefer specific explanations
This commit is contained in:
parent
7710d959f4
commit
372e4aee1d
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user