Skip to content

Commit

Permalink
Ignore projection type when determining upvar ancestory
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Oct 8, 2021
1 parent 680ff86 commit 5481201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/check/upvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5481201

Please sign in to comment.