Skip to content

Commit ba2b48d

Browse files
Fix3
1 parent 53afac7 commit ba2b48d

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

crates/hir-def/src/attr.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,7 @@ impl Attrs {
243243
}
244244

245245
pub fn doc_aliases(&self) -> Vec<SmolStr> {
246-
self.doc_exprs()
247-
.into_iter()
248-
.flat_map(|doc_expr| doc_expr.aliases())
249-
.collect()
246+
self.doc_exprs().into_iter().flat_map(|doc_expr| doc_expr.aliases()).collect()
250247
}
251248

252249
pub fn is_proc_macro(&self) -> bool {

crates/ide-completion/src/context.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use ide_db::{
1717
};
1818
use syntax::{
1919
ast::{self, AttrKind, NameOrNameRef},
20-
AstNode,
20+
AstNode, SmolStr,
2121
SyntaxKind::{self, *},
2222
SyntaxToken, TextRange, TextSize, T,
2323
};
@@ -493,7 +493,7 @@ impl<'a> CompletionContext<'a> {
493493

494494
/// A version of [`SemanticsScope::process_all_names`] that filters out `#[doc(hidden)]` items and
495495
/// passes all doc-aliases along, to funnel it into [`Completions::add_path_resolution`].
496-
pub(crate) fn process_all_names(&self, f: &mut dyn FnMut(Name, ScopeDef, Vec<syntax::SmolStr>)) {
496+
pub(crate) fn process_all_names(&self, f: &mut dyn FnMut(Name, ScopeDef, Vec<SmolStr>)) {
497497
let _p = profile::span("CompletionContext::process_all_names");
498498
self.scope.process_all_names(&mut |name, def| {
499499
if self.is_scope_def_hidden(def) {
@@ -547,7 +547,7 @@ impl<'a> CompletionContext<'a> {
547547
self.krate != defining_crate && attrs.has_doc_hidden()
548548
}
549549

550-
fn doc_aliases(&self, scope_def: ScopeDef) -> Vec<syntax::SmolStr> {
550+
fn doc_aliases(&self, scope_def: ScopeDef) -> Vec<SmolStr> {
551551
if let Some(attrs) = scope_def.attrs(self.db) {
552552
attrs.doc_aliases()
553553
} else {

0 commit comments

Comments
 (0)