]> git.lizzy.rs Git - rust.git/commitdiff
Merge pull request #2038 from jugglerchris/add_test_skip_attr
authorNick Cameron <nrc@ncameron.org>
Sat, 7 Oct 2017 05:19:15 +0000 (13:19 +0800)
committerGitHub <noreply@github.com>
Sat, 7 Oct 2017 05:19:15 +0000 (13:19 +0800)
Add a test that the skip attribute applies to other attributes.

tests/source/skip.rs
tests/target/skip.rs

index 69c7b53a57b088670b9fd589363540032618f18b..d28ccd77de02c896435869d79fc9d1c809f1e313 100644 (file)
@@ -63,3 +63,11 @@ fn skip_on_statements() {
     #[cfg_attr(rustfmt, rustfmt_skip)]
     foo(  a,   b  ,  c)
 }
+
+// Check that the skip attribute applies to other attributes.
+#[rustfmt_skip]
+#[cfg
+(  a , b
+)]
+fn
+main() {}
index 69c7b53a57b088670b9fd589363540032618f18b..d28ccd77de02c896435869d79fc9d1c809f1e313 100644 (file)
@@ -63,3 +63,11 @@ fn skip_on_statements() {
     #[cfg_attr(rustfmt, rustfmt_skip)]
     foo(  a,   b  ,  c)
 }
+
+// Check that the skip attribute applies to other attributes.
+#[rustfmt_skip]
+#[cfg
+(  a , b
+)]
+fn
+main() {}