diff options
author | Aleksey Kladov <[email protected]> | 2020-08-18 18:31:06 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-18 18:36:27 +0100 |
commit | 27ccc95c60d5652d5e7ef0dd7bd50cf221385d00 (patch) | |
tree | 7ce49ed16d73f8183f4456be2299c2dea9d36f40 /crates/ide/src/completion/complete_attribute.rs | |
parent | f18f9da7d80c669cf14bc2e85e40d883c621262a (diff) |
Cleanup feature generation
Diffstat (limited to 'crates/ide/src/completion/complete_attribute.rs')
-rw-r--r-- | crates/ide/src/completion/complete_attribute.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ide/src/completion/complete_attribute.rs b/crates/ide/src/completion/complete_attribute.rs index b193c6387..042c3ecef 100644 --- a/crates/ide/src/completion/complete_attribute.rs +++ b/crates/ide/src/completion/complete_attribute.rs | |||
@@ -9,7 +9,7 @@ use syntax::{ast, AstNode, SyntaxKind}; | |||
9 | use crate::completion::{ | 9 | use crate::completion::{ |
10 | completion_context::CompletionContext, | 10 | completion_context::CompletionContext, |
11 | completion_item::{CompletionItem, CompletionItemKind, CompletionKind, Completions}, | 11 | completion_item::{CompletionItem, CompletionItemKind, CompletionKind, Completions}, |
12 | UNSTABLE_FEATURE_DESCRIPTOR, | 12 | generated_features::FEATURES, |
13 | }; | 13 | }; |
14 | 14 | ||
15 | pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { | 15 | pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { |
@@ -19,7 +19,7 @@ pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) | |||
19 | complete_derive(acc, ctx, token_tree) | 19 | complete_derive(acc, ctx, token_tree) |
20 | } | 20 | } |
21 | (Some(path), Some(token_tree)) if path.to_string() == "feature" => { | 21 | (Some(path), Some(token_tree)) if path.to_string() == "feature" => { |
22 | complete_lint(acc, ctx, token_tree, UNSTABLE_FEATURE_DESCRIPTOR) | 22 | complete_lint(acc, ctx, token_tree, FEATURES) |
23 | } | 23 | } |
24 | (Some(path), Some(token_tree)) | 24 | (Some(path), Some(token_tree)) |
25 | if ["allow", "warn", "deny", "forbid"] | 25 | if ["allow", "warn", "deny", "forbid"] |
@@ -237,7 +237,7 @@ fn get_derive_names_in_scope(ctx: &CompletionContext) -> FxHashSet<String> { | |||
237 | result | 237 | result |
238 | } | 238 | } |
239 | 239 | ||
240 | pub(crate) struct DeriveCompletion { | 240 | struct DeriveCompletion { |
241 | label: &'static str, | 241 | label: &'static str, |
242 | dependencies: &'static [&'static str], | 242 | dependencies: &'static [&'static str], |
243 | } | 243 | } |
@@ -257,9 +257,9 @@ const DEFAULT_DERIVE_COMPLETIONS: &[DeriveCompletion] = &[ | |||
257 | DeriveCompletion { label: "Ord", dependencies: &["PartialOrd", "Eq", "PartialEq"] }, | 257 | DeriveCompletion { label: "Ord", dependencies: &["PartialOrd", "Eq", "PartialEq"] }, |
258 | ]; | 258 | ]; |
259 | 259 | ||
260 | pub(crate) struct LintCompletion { | 260 | pub(super) struct LintCompletion { |
261 | pub(crate) label: &'static str, | 261 | pub(super) label: &'static str, |
262 | pub(crate) description: &'static str, | 262 | pub(super) description: &'static str, |
263 | } | 263 | } |
264 | 264 | ||
265 | #[rustfmt::skip] | 265 | #[rustfmt::skip] |