Skip to content

Commit ce633b2

Browse files
nbdd0121cuviper
authored andcommitted
Ignore projection type when determining upvar ancestory
(cherry picked from commit 5481201)
1 parent 6689493 commit ce633b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_typeck/src/check/upvar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,7 @@ fn determine_place_ancestry_relation(
23032303
let projections_b = &place_b.projections;
23042304

23052305
let same_initial_projections =
2306-
iter::zip(projections_a, projections_b).all(|(proj_a, proj_b)| proj_a == proj_b);
2306+
iter::zip(projections_a, projections_b).all(|(proj_a, proj_b)| proj_a.kind == proj_b.kind);
23072307

23082308
if same_initial_projections {
23092309
// First min(n, m) projections are the same

0 commit comments

Comments
 (0)