From 5aad6c9fa69915c4810a8e93d793d76de211f2ca Mon Sep 17 00:00:00 2001 From: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Date: Mon, 22 Jun 2020 13:39:05 +0200 Subject: don't complete top level attrs inside nested attrs and add better labels #4899 Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> --- crates/ra_ide/src/completion/complete_attribute.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'crates') diff --git a/crates/ra_ide/src/completion/complete_attribute.rs b/crates/ra_ide/src/completion/complete_attribute.rs index 443b3b87d..ade17a1ff 100644 --- a/crates/ra_ide/src/completion/complete_attribute.rs +++ b/crates/ra_ide/src/completion/complete_attribute.rs @@ -20,14 +20,7 @@ pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) { complete_derive(acc, ctx, token_tree) } - (_, Some(ast::AttrInput::TokenTree(token_tree))) => { - let token_tree_str = token_tree.to_string(); - let nested = token_tree_str.starts_with('(') && token_tree_str.ends_with(')'); - - if !nested { - complete_attribute_start(acc, ctx, attribute); - } - } + (_, Some(ast::AttrInput::TokenTree(_token_tree))) => {} _ => complete_attribute_start(acc, ctx, attribute), } Some(()) -- cgit v1.2.3