We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7710d95 commit 372e4aeCopy full SHA for 372e4ae
src/librustc_mir/borrow_check/nll/region_infer/error_reporting/mod.rs
@@ -124,13 +124,15 @@ impl<'tcx> RegionInferenceContext<'tcx> {
124
let constraint = &self.constraints[path[i]];
125
126
let constraint_sup_scc = self.constraint_sccs.scc(constraint.sup);
127
- if constraint_sup_scc == target_scc {
128
- return false;
129
- }
130
131
match categorized_path[i].0 {
132
ConstraintCategory::Boring => false,
133
- _ => true,
+ ConstraintCategory::Other => {
+ // other isn't interesting when the two lifetimes
+ // are unified.
+ constraint_sup_scc != self.constraint_sccs.scc(constraint.sub)
134
+ }
135
+ _ => constraint_sup_scc != target_scc,
136
}
137
});
138
if let Some(i) = best_choice {
0 commit comments