Skip to content

Commit 6c9ee31

Browse files
authored
Merge pull request #2038 from jugglerchris/add_test_skip_attr
Add a test that the skip attribute applies to other attributes.
2 parents eec833f + 27e269e commit 6c9ee31

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/source/skip.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,11 @@ fn skip_on_statements() {
6363
#[cfg_attr(rustfmt, rustfmt_skip)]
6464
foo( a, b , c)
6565
}
66+
67+
// Check that the skip attribute applies to other attributes.
68+
#[rustfmt_skip]
69+
#[cfg
70+
( a , b
71+
)]
72+
fn
73+
main() {}

tests/target/skip.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,11 @@ fn skip_on_statements() {
6363
#[cfg_attr(rustfmt, rustfmt_skip)]
6464
foo( a, b , c)
6565
}
66+
67+
// Check that the skip attribute applies to other attributes.
68+
#[rustfmt_skip]
69+
#[cfg
70+
( a , b
71+
)]
72+
fn
73+
main() {}

0 commit comments

Comments
 (0)