]> git.lizzy.rs Git - rust.git/commitdiff
Delete optional arg for inline attr and add doc alias attr completion #7167
authorBenjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Mon, 18 Jan 2021 19:49:59 +0000 (20:49 +0100)
committerBenjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Mon, 18 Jan 2021 19:50:45 +0000 (20:50 +0100)
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
crates/completion/src/completions/attribute.rs

index e5522980d7c6f15c6432a1d4c2cd78f564021945..ab25a8c58502ffd5abc324af46a00ea6f9a97e27 100644 (file)
@@ -99,13 +99,14 @@ const fn attr(
         Some("export_name"),
         Some(r#"export_name = "${0:exported_symbol_name}""#),
     ),
+    attr(r#"doc(alias = "…")"#, Some("docalias"), Some(r#"doc(alias = "${0:docs}")"#)),
     attr(r#"doc = "…""#, Some("doc"), Some(r#"doc = "${0:docs}""#)),
     attr("feature(…)", Some("feature"), Some("feature(${0:flag})")).prefer_inner(),
     attr("forbid(…)", Some("forbid"), Some("forbid(${0:lint})")),
     // FIXME: resolve through macro resolution?
     attr("global_allocator", None, None).prefer_inner(),
     attr(r#"ignore = "…""#, Some("ignore"), Some(r#"ignore = "${0:reason}""#)),
-    attr("inline(…)", Some("inline"), Some("inline(${0:lint})")),
+    attr("inline", Some("inline"), Some("inline")),
     attr("link", None, None),
     attr(r#"link_name = "…""#, Some("link_name"), Some(r#"link_name = "${0:symbol_name}""#)),
     attr(
@@ -468,10 +469,11 @@ fn test_attribute_completion() {
                 at deprecated
                 at derive(…)
                 at export_name = "…"
+                at doc(alias = "…")
                 at doc = "…"
                 at forbid(…)
                 at ignore = "…"
-                at inline(…)
+                at inline
                 at link
                 at link_name = "…"
                 at link_section = "…"
@@ -515,12 +517,13 @@ fn test_inner_attribute_completion() {
                 at deprecated
                 at derive(…)
                 at export_name = "…"
+                at doc(alias = "…")
                 at doc = "…"
                 at feature(…)
                 at forbid(…)
                 at global_allocator
                 at ignore = "…"
-                at inline(…)
+                at inline
                 at link
                 at link_name = "…"
                 at link_section = "…"