Merge pull request #19996 from LHolten/exclude-imports
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run

Add support for excluding imports from symbol search
This commit is contained in:
Chayim Refael Friedman 2025-06-15 00:52:44 +00:00 committed by GitHub
commit 4d30c53ceb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 214 additions and 1 deletions

View file

@ -33,6 +33,7 @@ pub struct FileSymbol {
/// Whether this symbol is a doc alias for the original symbol.
pub is_alias: bool,
pub is_assoc: bool,
pub is_import: bool,
pub do_not_complete: Complete,
}
@ -196,6 +197,7 @@ impl<'a> SymbolCollector<'a> {
loc: dec_loc,
is_alias: false,
is_assoc: false,
is_import: true,
do_not_complete: Complete::Yes,
});
};
@ -226,6 +228,7 @@ impl<'a> SymbolCollector<'a> {
loc: dec_loc,
is_alias: false,
is_assoc: false,
is_import: false,
do_not_complete: Complete::Yes,
});
};
@ -397,6 +400,7 @@ impl<'a> SymbolCollector<'a> {
container_name: self.current_container_name.clone(),
is_alias: true,
is_assoc,
is_import: false,
do_not_complete,
});
}
@ -409,6 +413,7 @@ impl<'a> SymbolCollector<'a> {
loc: dec_loc,
is_alias: false,
is_assoc,
is_import: false,
do_not_complete,
});
@ -441,6 +446,7 @@ impl<'a> SymbolCollector<'a> {
container_name: self.current_container_name.clone(),
is_alias: true,
is_assoc: false,
is_import: false,
do_not_complete,
});
}
@ -453,6 +459,7 @@ impl<'a> SymbolCollector<'a> {
loc: dec_loc,
is_alias: false,
is_assoc: false,
is_import: false,
do_not_complete,
});
}