Skip to content

Commit

Permalink
fix: collect naming infos for fields and variants for which item used (
Browse files Browse the repository at this point in the history
  • Loading branch information
Millione authored Jun 24, 2024
1 parent d4be29a commit 89ea743
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pilota-build/src/middle/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,11 @@ impl ContextBuilder {
let mut map: FxHashMap<String, Vec<DefId>> = FxHashMap::default();
cx.nodes().iter().for_each(|(def_id, node)| {
if let Mode::Workspace(_) = &*cx.mode {
if !cx.location_map.contains_key(def_id) {
let mut item_def_id = *def_id;
while !matches!(cx.node(item_def_id).unwrap().kind, NodeKind::Item(_)) {
item_def_id = cx.node(item_def_id).unwrap().parent.unwrap()
}
if !cx.location_map.contains_key(&item_def_id) {
return;
}
}
Expand Down

0 comments on commit 89ea743

Please sign in to comment.