about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-27 12:28:36 +0000
committerbors <bors@rust-lang.org>2022-06-27 12:28:36 +0000
commit4c3954682df28b8caa2b1ff954347230c8e7982a (patch)
treec10c9ad826ffa97efd8064d8fb8680752718b3f4
parentf6c0bf8f092d4bd6076e8ba25926b5a6cce62f24 (diff)
parentbef89e95e721a3ed37d055dfcd1b547e0a5676e8 (diff)
downloadrust-4c3954682df28b8caa2b1ff954347230c8e7982a.tar.gz
rust-4c3954682df28b8caa2b1ff954347230c8e7982a.zip
Auto merge of #12635 - antogilbert:tgt_feat, r=Veykril
Correct target_feature completion

I changed the `target_feature` to match the description given in #12616.
-rw-r--r--crates/ide-completion/src/completions/attribute.rs4
-rw-r--r--crates/ide-completion/src/tests/attribute.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide-completion/src/completions/attribute.rs b/crates/ide-completion/src/completions/attribute.rs
index 154c096f4d5..2de33a73622 100644
--- a/crates/ide-completion/src/completions/attribute.rs
+++ b/crates/ide-completion/src/completions/attribute.rs
@@ -330,9 +330,9 @@ const ATTRIBUTES: &[AttrCompletion] = &[
     attr("repr(…)", Some("repr"), Some("repr(${0:C})")),
     attr("should_panic", Some("should_panic"), Some(r#"should_panic"#)),
     attr(
-        r#"target_feature = "…""#,
+        r#"target_feature(enable = "…")"#,
         Some("target_feature"),
-        Some(r#"target_feature = "${0:feature}""#),
+        Some(r#"target_feature(enable = "${0:feature}")"#),
     ),
     attr("test", None, None),
     attr("track_caller", None, None),
diff --git a/crates/ide-completion/src/tests/attribute.rs b/crates/ide-completion/src/tests/attribute.rs
index 52c69f84b61..3b366c94bf0 100644
--- a/crates/ide-completion/src/tests/attribute.rs
+++ b/crates/ide-completion/src/tests/attribute.rs
@@ -568,7 +568,7 @@ fn attr_on_fn() {
             at proc_macro_attribute
             at proc_macro_derive(…)
             at should_panic
-            at target_feature = "…"
+            at target_feature(enable = "…")
             at test
             at track_caller
             at warn(…)
@@ -615,7 +615,7 @@ fn attr_in_source_file_end() {
             at proc_macro_derive(…)
             at repr(…)
             at should_panic
-            at target_feature = "…"
+            at target_feature(enable = "…")
             at test
             at track_caller
             at used