Skip to content

Commit 5aad6c9

Browse files
committed
don't complete top level attrs inside nested attrs and add better labels #4899
Signed-off-by: Benjamin Coenen <[email protected]>
1 parent 3df879f commit 5aad6c9

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

crates/ra_ide/src/completion/complete_attribute.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,7 @@ pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext)
2020
{
2121
complete_derive(acc, ctx, token_tree)
2222
}
23-
(_, Some(ast::AttrInput::TokenTree(token_tree))) => {
24-
let token_tree_str = token_tree.to_string();
25-
let nested = token_tree_str.starts_with('(') && token_tree_str.ends_with(')');
26-
27-
if !nested {
28-
complete_attribute_start(acc, ctx, attribute);
29-
}
30-
}
23+
(_, Some(ast::AttrInput::TokenTree(_token_tree))) => {}
3124
_ => complete_attribute_start(acc, ctx, attribute),
3225
}
3326
Some(())

0 commit comments

Comments
 (0)