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.)
This commit is contained in:
Nicholas Nethercote 2018-04-20 20:27:58 +10:00
parent 23561c6747
commit 144c0d5519

View File

@ -706,7 +706,7 @@ impl<'tcx> ScopeTree {
// "Modeling closures" section of the README in
// infer::region_constraints for more details.
let a_root_scope = a_ancestors[a_index];
let b_root_scope = a_ancestors[a_index];
let b_root_scope = b_ancestors[b_index];
return match (a_root_scope.data(), b_root_scope.data()) {
(ScopeData::Destruction(a_root_id),
ScopeData::Destruction(b_root_id)) => {