diff options
| author | Gary Guo <gary@garyguo.net> | 2021-10-08 03:59:56 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2021-10-08 04:00:10 +0100 |
| commit | 54812011600a2c19f7076c438e6eabe6a8063774 (patch) | |
| tree | a183ca61d51ad1674cf44757a42637a9fd26099b /compiler | |
| parent | 680ff86391f19e12b485293f01372036e85ba87c (diff) | |
| download | rust-54812011600a2c19f7076c438e6eabe6a8063774.tar.gz rust-54812011600a2c19f7076c438e6eabe6a8063774.zip | |
Ignore projection type when determining upvar ancestory
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_typeck/src/check/upvar.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/check/upvar.rs b/compiler/rustc_typeck/src/check/upvar.rs index b7c042a08cf..9b94fda5153 100644 --- a/compiler/rustc_typeck/src/check/upvar.rs +++ b/compiler/rustc_typeck/src/check/upvar.rs @@ -2278,7 +2278,7 @@ fn determine_place_ancestry_relation( let projections_b = &place_b.projections; let same_initial_projections = - iter::zip(projections_a, projections_b).all(|(proj_a, proj_b)| proj_a == proj_b); + iter::zip(projections_a, projections_b).all(|(proj_a, proj_b)| proj_a.kind == proj_b.kind); if same_initial_projections { // First min(n, m) projections are the same |
