diff options
Diffstat (limited to 'crates/ra_ide/src/completion')
-rw-r--r-- | crates/ra_ide/src/completion/complete_attribute.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crates/ra_ide/src/completion/complete_attribute.rs b/crates/ra_ide/src/completion/complete_attribute.rs index 50b0b3ff6..2161cdfd2 100644 --- a/crates/ra_ide/src/completion/complete_attribute.rs +++ b/crates/ra_ide/src/completion/complete_attribute.rs | |||
@@ -19,9 +19,7 @@ pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) | |||
19 | (Some(path), Some(token_tree)) if path.to_string() == "derive" => { | 19 | (Some(path), Some(token_tree)) if path.to_string() == "derive" => { |
20 | complete_derive(acc, ctx, token_tree) | 20 | complete_derive(acc, ctx, token_tree) |
21 | } | 21 | } |
22 | (Some(path), Some(token_tree)) | 22 | (Some(path), Some(token_tree)) if path.to_string() == "feature" => { |
23 | if path.to_string() == "feature" => | ||
24 | { | ||
25 | complete_lint(acc, ctx, token_tree, UNSTABLE_FEATURE_DESCRIPTOR); | 23 | complete_lint(acc, ctx, token_tree, UNSTABLE_FEATURE_DESCRIPTOR); |
26 | } | 24 | } |
27 | (Some(path), Some(token_tree)) | 25 | (Some(path), Some(token_tree)) |
@@ -169,7 +167,12 @@ fn complete_derive(acc: &mut Completions, ctx: &CompletionContext, derive_input: | |||
169 | } | 167 | } |
170 | } | 168 | } |
171 | 169 | ||
172 | fn complete_lint(acc: &mut Completions, ctx: &CompletionContext, derive_input: ast::TokenTree, lints_completions: &[LintCompletion]) { | 170 | fn complete_lint( |
171 | acc: &mut Completions, | ||
172 | ctx: &CompletionContext, | ||
173 | derive_input: ast::TokenTree, | ||
174 | lints_completions: &[LintCompletion], | ||
175 | ) { | ||
173 | if let Ok(existing_lints) = parse_comma_sep_input(derive_input) { | 176 | if let Ok(existing_lints) = parse_comma_sep_input(derive_input) { |
174 | for lint_completion in lints_completions | 177 | for lint_completion in lints_completions |
175 | .into_iter() | 178 | .into_iter() |