Skip to content

Commit 144c0d5

Browse files
committed
Fix a copy-and-paste bug in nearest_common_ancestor.
This code path is rarely hit, which likely explains why this bug hasn't been detected before now. (I only noticed it via code inspection.)
1 parent 23561c6 commit 144c0d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/region.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ impl<'tcx> ScopeTree {
706706
// "Modeling closures" section of the README in
707707
// infer::region_constraints for more details.
708708
let a_root_scope = a_ancestors[a_index];
709-
let b_root_scope = a_ancestors[a_index];
709+
let b_root_scope = b_ancestors[b_index];
710710
return match (a_root_scope.data(), b_root_scope.data()) {
711711
(ScopeData::Destruction(a_root_id),
712712
ScopeData::Destruction(b_root_id)) => {

0 commit comments

Comments
 (0)