From c1bf1f88ad4199e48d2615dbf9479e602b5e9eff Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 17 Jun 2021 21:15:35 +0200 Subject: Complete `repr` attribute parameters --- crates/ide_completion/src/completions/attribute.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ide_completion/src/completions/attribute.rs') diff --git a/crates/ide_completion/src/completions/attribute.rs b/crates/ide_completion/src/completions/attribute.rs index f3b11e72d..9780d01ae 100644 --- a/crates/ide_completion/src/completions/attribute.rs +++ b/crates/ide_completion/src/completions/attribute.rs @@ -17,12 +17,14 @@ use crate::{ mod derive; mod lint; +mod repr; pub(crate) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { let attribute = ctx.attribute_under_caret.as_ref()?; match (attribute.path().and_then(|p| p.as_single_name_ref()), attribute.token_tree()) { (Some(path), Some(token_tree)) => match path.text().as_str() { "derive" => derive::complete_derive(acc, ctx, token_tree), + "repr" => repr::complete_repr(acc, ctx, token_tree), "feature" => lint::complete_lint(acc, ctx, token_tree, FEATURES), "allow" | "warn" | "deny" | "forbid" => { lint::complete_lint(acc, ctx, token_tree.clone(), DEFAULT_LINTS); -- cgit v1.2.3