diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-04-20 20:27:58 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-04-20 20:27:58 +1000 |
| commit | 144c0d5519dff9eca7bacd6191856ef57dbb7e0f (patch) | |
| tree | 208c9a3951389133dffc9cd4af1c168bb69fdd66 /src | |
| parent | 23561c6747b0916e852aaa2a5d04c0b0eeddc6de (diff) | |
| download | rust-144c0d5519dff9eca7bacd6191856ef57dbb7e0f.tar.gz rust-144c0d5519dff9eca7bacd6191856ef57dbb7e0f.zip | |
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.)
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/middle/region.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index 42483c83f4b..b77e0b5fae9 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -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)) => { |
