feat(completion): add doc(hidden) completion for attributes

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
Benjamin Coenen 2021-02-20 15:16:05 +01:00
parent ba3a5c518a
commit cf32dbd9bf

View File

@ -101,6 +101,7 @@ const fn attr(
),
attr(r#"doc(alias = "…")"#, Some("docalias"), Some(r#"doc(alias = "${0:docs}")"#)),
attr(r#"doc = "…""#, Some("doc"), Some(r#"doc = "${0:docs}""#)),
attr(r#"doc(hidden)"#, Some("dochidden"), Some(r#"doc(hidden)"#)),
attr("feature(…)", Some("feature"), Some("feature(${0:flag})")).prefer_inner(),
attr("forbid(…)", Some("forbid"), Some("forbid(${0:lint})")),
// FIXME: resolve through macro resolution?
@ -471,6 +472,7 @@ fn test_attribute_completion() {
at export_name = ""
at doc(alias = "")
at doc = ""
at doc(hidden)
at forbid()
at ignore = ""
at inline
@ -519,6 +521,7 @@ fn test_inner_attribute_completion() {
at export_name = ""
at doc(alias = "")
at doc = ""
at doc(hidden)
at feature()
at forbid()
at global_allocator