Skip to content

Commit b4fb50a

Browse files
aibaarspaldepind
authored andcommitted
Rust: crate_graph: extract only public items
1 parent 60e1b16 commit b4fb50a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rust/extractor/src/crate_graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ fn emit_module_items(
175175
let mut items = Vec::new();
176176
let item_scope = &module.scope;
177177
for (name, item) in item_scope.entries() {
178-
let def = item.with_visibility(ra_ap_hir::Visibility::Public);
178+
let def = item.filter_visibility(|x| matches!(x, ra_ap_hir::Visibility::Public));
179179
if let Some(ra_ap_hir_def::per_ns::Item {
180180
def: value,
181181
vis,

0 commit comments

Comments
 (0)