Add doc(alias)-based use and other mod completion

This commit is contained in:
hecatia-elegua 2023-04-05 22:08:59 +02:00
parent f87f468dbd
commit b4515d987f
4 changed files with 43 additions and 3 deletions

View file

@ -555,7 +555,7 @@ impl<'a> CompletionContext<'a> {
self.krate != defining_crate && attrs.has_doc_hidden()
}
fn doc_aliases_in_scope(&self, scope_def: ScopeDef) -> Vec<SmolStr> {
pub(crate) fn doc_aliases_in_scope(&self, scope_def: ScopeDef) -> Vec<SmolStr> {
if let Some(attrs) = scope_def.attrs(self.db) {
attrs.doc_aliases().collect()
} else {