From 47ad3b2be42790a54840f5aec9a3526244bedc55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Tue, 17 Dec 2024 19:43:05 +0800 Subject: [PATCH] Adjust `tests/ui/attrs-resolution.rs` - Move `tests/ui/attrs-resolution.rs` to `tests/ui/resolve/`. - Document test intent. - Rename test to `non-macro-attrs-accepted.rs` to better reflect test intent. --- .../non-macro-attrs-accepted.rs} | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) rename tests/ui/{attrs-resolution.rs => resolve/non-macro-attrs-accepted.rs} (66%) diff --git a/tests/ui/attrs-resolution.rs b/tests/ui/resolve/non-macro-attrs-accepted.rs similarity index 66% rename from tests/ui/attrs-resolution.rs rename to tests/ui/resolve/non-macro-attrs-accepted.rs index 38dd3812d6892..76a04b2e83749 100644 --- a/tests/ui/attrs-resolution.rs +++ b/tests/ui/resolve/non-macro-attrs-accepted.rs @@ -1,3 +1,11 @@ +//! Check that certain positions (listed below) permit *non-macro* attributes. +//! +//! - Enum variants +//! - Struct fields +//! - Field in a struct pattern +//! - Match arm +//! - Field in struct initialization expression + //@ check-pass enum FooEnum { @@ -30,7 +38,7 @@ fn main() { _ => {} } - let _another_foo_strunct = FooStruct { + let _another_foo_struct = FooStruct { #[rustfmt::skip] bar: 1, };