Skip to content
/ rust Public
forked from rust-lang/rust

Commit

Permalink
Adjust tests/ui/attrs-resolution.rs
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
jieyouxu committed Dec 17, 2024
1 parent 836a0e0 commit 47ad3b2
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -30,7 +38,7 @@ fn main() {
_ => {}
}

let _another_foo_strunct = FooStruct {
let _another_foo_struct = FooStruct {
#[rustfmt::skip]
bar: 1,
};
Expand Down

0 comments on commit 47ad3b2

Please sign in to comment.