diff --git a/crates/hir-def/src/attr.rs b/crates/hir-def/src/attr.rs index a13f660d7e..d44f84e569 100644 --- a/crates/hir-def/src/attr.rs +++ b/crates/hir-def/src/attr.rs @@ -243,10 +243,7 @@ impl Attrs { } pub fn doc_aliases(&self) -> Vec { - self.doc_exprs() - .into_iter() - .flat_map(|doc_expr| doc_expr.aliases()) - .collect() + self.doc_exprs().into_iter().flat_map(|doc_expr| doc_expr.aliases()).collect() } pub fn is_proc_macro(&self) -> bool { diff --git a/crates/ide-completion/src/context.rs b/crates/ide-completion/src/context.rs index fbc6f11060..072e8c5263 100644 --- a/crates/ide-completion/src/context.rs +++ b/crates/ide-completion/src/context.rs @@ -17,7 +17,7 @@ use ide_db::{ }; use syntax::{ ast::{self, AttrKind, NameOrNameRef}, - AstNode, + AstNode, SmolStr, SyntaxKind::{self, *}, SyntaxToken, TextRange, TextSize, T, }; @@ -493,7 +493,7 @@ impl<'a> CompletionContext<'a> { /// A version of [`SemanticsScope::process_all_names`] that filters out `#[doc(hidden)]` items and /// passes all doc-aliases along, to funnel it into [`Completions::add_path_resolution`]. - pub(crate) fn process_all_names(&self, f: &mut dyn FnMut(Name, ScopeDef, Vec)) { + pub(crate) fn process_all_names(&self, f: &mut dyn FnMut(Name, ScopeDef, Vec)) { let _p = profile::span("CompletionContext::process_all_names"); self.scope.process_all_names(&mut |name, def| { if self.is_scope_def_hidden(def) { @@ -547,7 +547,7 @@ impl<'a> CompletionContext<'a> { self.krate != defining_crate && attrs.has_doc_hidden() } - fn doc_aliases(&self, scope_def: ScopeDef) -> Vec { + fn doc_aliases(&self, scope_def: ScopeDef) -> Vec { if let Some(attrs) = scope_def.attrs(self.db) { attrs.doc_aliases() } else {