From 8f4478390e29f34c5530a25bd0338b689218677f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 4 May 2020 15:08:51 +0200 Subject: Qualify ast types --- crates/ra_ide/src/completion/complete_attribute.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/completion/complete_attribute.rs b/crates/ra_ide/src/completion/complete_attribute.rs index 4eaaa0b6f..f17266221 100644 --- a/crates/ra_ide/src/completion/complete_attribute.rs +++ b/crates/ra_ide/src/completion/complete_attribute.rs @@ -3,10 +3,7 @@ //! This module uses a bit of static metadata to provide completions //! for built-in attributes. -use ra_syntax::{ - ast::{self, AttrInput, AttrKind}, - AstNode, SyntaxKind, -}; +use ra_syntax::{ast, AstNode, SyntaxKind}; use rustc_hash::FxHashSet; use crate::completion::{ @@ -18,7 +15,9 @@ pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) let attribute = ctx.attribute_under_caret.as_ref()?; match (attribute.path(), attribute.input()) { - (Some(path), Some(AttrInput::TokenTree(token_tree))) if path.to_string() == "derive" => { + (Some(path), Some(ast::AttrInput::TokenTree(token_tree))) + if path.to_string() == "derive" => + { complete_derive(acc, ctx, token_tree) } _ => complete_attribute_start(acc, ctx, attribute), @@ -42,7 +41,7 @@ fn complete_attribute_start(acc: &mut Completions, ctx: &CompletionContext, attr _ => {} } - if attribute.kind() == AttrKind::Inner || !attr_completion.should_be_inner { + if attribute.kind() == ast::AttrKind::Inner || !attr_completion.should_be_inner { acc.add(item); } } -- cgit v1.2.3