Skip to content

Commit 2f81511

Browse files
committed
start tracking changed flag
1 parent 35c33ca commit 2f81511

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler/rustc_resolve/src/access_levels.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ impl<'r, 'a> AccessLevelsVisitor<'r, 'a> {
108108
if current_vis.is_at_least(nearest_available_vis, &*self.r) {nearest_available_vis} else {current_vis}
109109
}
110110
};
111+
let current_effective_vis_copy = current_effective_vis.clone();
111112
current_effective_vis.update(calculated_effective_vis, tag, &*self.r);
112-
self.r.access_levels.set_effective_vis(current_id, current_effective_vis);
113+
114+
if current_effective_vis_copy != current_effective_vis {
115+
self.changed = true;
116+
self.r.access_levels.set_effective_vis(current_id, current_effective_vis);
117+
}
113118
}
114119
}
115120

0 commit comments

Comments
 (0)