about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-12-17 19:43:05 +0800
committer许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-12-17 19:57:42 +0800
commit47ad3b2be42790a54840f5aec9a3526244bedc55 (patch)
treecb1a47dc026a30bf5914f8a0848bea4a60d4f365
parent836a0e00e5d29b845748cf42713445076418473b (diff)
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.
-rw-r--r--tests/ui/resolve/non-macro-attrs-accepted.rs (renamed from tests/ui/attrs-resolution.rs)10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/ui/attrs-resolution.rs b/tests/ui/resolve/non-macro-attrs-accepted.rs
index 38dd3812d68..76a04b2e837 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,
     };