Skip to content

Commit 5481201

Browse files
committed
Ignore projection type when determining upvar ancestory
1 parent 680ff86 commit 5481201

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
@@ -2278,7 +2278,7 @@ fn determine_place_ancestry_relation(
22782278
let projections_b = &place_b.projections;
22792279

22802280
let same_initial_projections =
2281-
iter::zip(projections_a, projections_b).all(|(proj_a, proj_b)| proj_a == proj_b);
2281+
iter::zip(projections_a, projections_b).all(|(proj_a, proj_b)| proj_a.kind == proj_b.kind);
22822282

22832283
if same_initial_projections {
22842284
// First min(n, m) projections are the same

0 commit comments

Comments
 (0)