From 51f566062fefc2262dd3b56f7e385f1dd749bd8b Mon Sep 17 00:00:00 2001
From: Nick Cameron <ncameron@mozilla.com>
Date: Mon, 14 May 2018 16:25:10 +1200
Subject: [PATCH] Update uses of `rustfmt_skip` to `rustfmt::skip`

---
 Configurations.md                                  |  4 ++--
 src/comment.rs                                     |  2 +-
 src/lib.rs                                         |  9 +++------
 src/test/mod.rs                                    |  6 +++---
 tests/config/skip_children.toml                    |  2 +-
 tests/source/comment4.rs                           |  2 +-
 .../configs/struct_field_align_threshold/20.rs     |  4 ++--
 .../configs/use_field_init_shorthand/false.rs      |  2 +-
 .../configs/use_field_init_shorthand/true.rs       |  2 +-
 tests/source/enum.rs                               |  2 +-
 tests/source/issue-1124.rs                         |  2 +-
 tests/source/match.rs                              |  4 ++--
 tests/source/multiple.rs                           |  6 +++---
 tests/source/structs.rs                            |  4 ++--
 tests/source/trait.rs                              |  2 +-
 tests/source/unions.rs                             |  4 ++--
 tests/target/comment4.rs                           |  2 +-
 .../configs/struct_field_align_threshold/20.rs     |  6 +++---
 .../configs/use_field_init_shorthand/false.rs      |  2 +-
 .../configs/use_field_init_shorthand/true.rs       |  2 +-
 tests/target/enum.rs                               |  2 +-
 tests/target/fn.rs                                 |  2 +-
 tests/target/match.rs                              |  4 ++--
 tests/target/multiple.rs                           |  6 +++---
 tests/target/skip.rs                               | 14 +++++++-------
 tests/target/skip_mod.rs                           |  2 +-
 tests/target/structs.rs                            |  6 +++---
 tests/target/trait.rs                              |  2 +-
 tests/target/unions.rs                             |  6 +++---
 29 files changed, 55 insertions(+), 58 deletions(-)

diff --git a/Configurations.md b/Configurations.md
index 07a336d93fa..9c0d9481b50 100644
--- a/Configurations.md
+++ b/Configurations.md
@@ -1951,7 +1951,7 @@ lines are found, they are trimmed down to match this integer.
 Original Code:
 
 ```rust
-#![rustfmt_skip]
+#![rustfmt::skip]
 
 fn foo() {
     println!("a");
@@ -2010,7 +2010,7 @@ them, additional blank lines are inserted.
 Original Code (rustfmt will not change it with the default value of `0`):
 
 ```rust
-#![rustfmt_skip]
+#![rustfmt::skip]
 
 fn foo() {
     println!("a");
diff --git a/src/comment.rs b/src/comment.rs
index 0b6c818e59e..f850c0bba44 100644
--- a/src/comment.rs
+++ b/src/comment.rs
@@ -1253,7 +1253,7 @@ mod test {
     }
 
     #[test]
-    #[cfg_attr(rustfmt, rustfmt_skip)]
+    #[rustfmt::skip]
     fn format_comments() {
         let mut config: ::config::Config = Default::default();
         config.set().wrap_comments(true);
diff --git a/src/lib.rs b/src/lib.rs
index c50c45fbd36..1045841ad0d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -8,12 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(custom_attribute)]
+#![feature(tool_attributes)]
 #![feature(decl_macro)]
-// FIXME(cramertj) remove after match_default_bindings merges
-#![allow(stable_features)]
 #![allow(unused_attributes)]
-#![feature(match_default_bindings)]
 #![feature(type_ascription)]
 #![feature(unicode_internals)]
 
@@ -396,7 +393,7 @@ where
     Ok((result, has_diff))
 }
 
-/// Returns true if the line with the given line number was skipped by `#[rustfmt_skip]`.
+/// Returns true if the line with the given line number was skipped by `#[rustfmt::skip]`.
 fn is_skipped_line(line_number: usize, skipped_range: &[(usize, usize)]) -> bool {
     skipped_range
         .iter()
@@ -975,7 +972,7 @@ mod unit_tests {
 
     #[test]
     fn test_format_code_block_fail() {
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         let code_block = "this_line_is_100_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(x, y, z);";
         assert!(format_code_block(code_block, &Config::default()).is_none());
     }
diff --git a/src/test/mod.rs b/src/test/mod.rs
index 4de69296e9f..b538519ec0b 100644
--- a/src/test/mod.rs
+++ b/src/test/mod.rs
@@ -704,14 +704,14 @@ impl ConfigCodeBlock {
         // We never expect to not have a code block.
         assert!(self.code_block.is_some() && self.code_block_start.is_some());
 
-        // See if code block begins with #![rustfmt_skip].
+        // See if code block begins with #![rustfmt::skip].
         let fmt_skip = self
             .code_block
             .as_ref()
             .unwrap()
             .split('\n')
             .nth(0)
-            .unwrap_or("") == "#![rustfmt_skip]";
+            .unwrap_or("") == "#![rustfmt::skip]";
 
         if self.config_name.is_none() && !fmt_skip {
             write_message(&format!(
@@ -790,7 +790,7 @@ impl ConfigCodeBlock {
     // - Rust code blocks are identifed by lines beginning with "```rust".
     // - One explicit configuration setting is supported per code block.
     // - Rust code blocks with no configuration setting are illegal and cause an
-    //   assertion failure, unless the snippet begins with #![rustfmt_skip].
+    //   assertion failure, unless the snippet begins with #![rustfmt::skip].
     // - Configuration names in Configurations.md must be in the form of
     //   "## `NAME`".
     // - Configuration values in Configurations.md must be in the form of
diff --git a/tests/config/skip_children.toml b/tests/config/skip_children.toml
index 49f37a88dfb..f52930d50b6 100644
--- a/tests/config/skip_children.toml
+++ b/tests/config/skip_children.toml
@@ -1 +1 @@
-skip_children = true
\ No newline at end of file
+skip_children = true
diff --git a/tests/source/comment4.rs b/tests/source/comment4.rs
index ff1445378d7..f53a8a4a1fe 100644
--- a/tests/source/comment4.rs
+++ b/tests/source/comment4.rs
@@ -48,5 +48,5 @@ fn debug_function() {
 
 #[link_section=".vectors"]
 #[no_mangle] // Test this attribute is preserved.
-#[cfg_attr(rustfmt, rustfmt_skip)]
+#[cfg_attr(rustfmt, rustfmt::skip)]
 pub static ISSUE_1284: [i32; 16] = [];
diff --git a/tests/source/configs/struct_field_align_threshold/20.rs b/tests/source/configs/struct_field_align_threshold/20.rs
index e68340b027d..229817e1405 100644
--- a/tests/source/configs/struct_field_align_threshold/20.rs
+++ b/tests/source/configs/struct_field_align_threshold/20.rs
@@ -36,7 +36,7 @@ fn main() {
                                                                        /// A Doc comment
 #[AnAttribute]
 pub struct Foo {
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     f :   SomeType, // Comment beside a field
     f: SomeType, // Comment beside a field
     // Comment on a field
@@ -166,7 +166,7 @@ struct Palette { /// A map of indices in the palette to a count of pixels in app
 // when the field had attributes
 struct FieldsWithAttributes {
     // Pre Comment
-    #[rustfmt_skip] pub host:String, // Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB
+    #[rustfmt::skip] pub host:String, // Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB
     //Another pre comment
     #[attr1]
     #[attr2] pub id: usize // CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCC CCCCCCCCCCCC
diff --git a/tests/source/configs/use_field_init_shorthand/false.rs b/tests/source/configs/use_field_init_shorthand/false.rs
index 16ce740f1b9..4c2eb1de179 100644
--- a/tests/source/configs/use_field_init_shorthand/false.rs
+++ b/tests/source/configs/use_field_init_shorthand/false.rs
@@ -13,7 +13,7 @@ fn main() {
         y: y,
         #[attr]
         z: z,
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         skipped: skipped,
     };
 }
diff --git a/tests/source/configs/use_field_init_shorthand/true.rs b/tests/source/configs/use_field_init_shorthand/true.rs
index 1e36c6cff35..dcde28d74e0 100644
--- a/tests/source/configs/use_field_init_shorthand/true.rs
+++ b/tests/source/configs/use_field_init_shorthand/true.rs
@@ -13,7 +13,7 @@ fn main() {
         y: y,
         #[attr]
         z: z,
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         skipped: skipped,
     };
 }
diff --git a/tests/source/enum.rs b/tests/source/enum.rs
index 64e15110609..654fc3a836d 100644
--- a/tests/source/enum.rs
+++ b/tests/source/enum.rs
@@ -49,7 +49,7 @@ pub enum EnumWithAttributes {
     //This is a pre comment AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
     TupleVar(usize, usize, usize), // AAAA AAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
     // Pre Comment
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     SkippedItem(String,String,), // Post-comment
     #[another_attr]
     #[attr2]
diff --git a/tests/source/issue-1124.rs b/tests/source/issue-1124.rs
index 69aa1bb1c59..5c5eb369161 100644
--- a/tests/source/issue-1124.rs
+++ b/tests/source/issue-1124.rs
@@ -13,4 +13,4 @@ use y;
 
 
 use x;
-use a;
\ No newline at end of file
+use a;
diff --git a/tests/source/match.rs b/tests/source/match.rs
index 31034f49402..d1664ca9f37 100644
--- a/tests/source/match.rs
+++ b/tests/source/match.rs
@@ -48,7 +48,7 @@ fn foo() {
         #[an_attribute]
         // Comment after an attribute.
         None => 0,
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         Blurb     =>     {                  }
     };
 }
@@ -103,7 +103,7 @@ fn matches() {
 
 fn match_skip() {
     let _ = match Some(1) {
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         Some( n ) => n,
         None      => 1,
     };
diff --git a/tests/source/multiple.rs b/tests/source/multiple.rs
index 68cfacfcb4b..c26df03edda 100644
--- a/tests/source/multiple.rs
+++ b/tests/source/multiple.rs
@@ -36,7 +36,7 @@ fn baz<'a: 'b /* comment on 'a */, T: Somsssssssssssssssssssssssssssssssssssssss
     #[attr2]#[attr3]extern crate foo;
 }
 
-#[rustfmt_skip]
+#[rustfmt::skip]
 fn qux(a: dadsfa,   // Comment 1
        b: sdfasdfa, // Comment 2
        c: dsfdsafa) // Comment 3
@@ -78,7 +78,7 @@ pub trait GraphWalk<'a, N, E> {
 /// A Doc comment
 #[AnAttribute]
 pub struct Foo {
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     f :   SomeType, // Comment beside a field
     f :   SomeType, // Comment beside a field
     // Comment on a field
@@ -126,7 +126,7 @@ fn deconstruct(foo: Bar) -> (SocketAddr, Method, Headers,
                      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) {
 }
 
-#[rustfmt_skip]
+#[rustfmt::skip]
 mod a{
 fn foo(x:    T) {
     let x:    T = dfasdf;
diff --git a/tests/source/structs.rs b/tests/source/structs.rs
index 25070aef34c..56471f1d7e4 100644
--- a/tests/source/structs.rs
+++ b/tests/source/structs.rs
@@ -4,7 +4,7 @@
                                                                        /// A Doc comment
 #[AnAttribute]
 pub struct Foo {
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     f :   SomeType, // Comment beside a field
     f: SomeType, // Comment beside a field
     // Comment on a field
@@ -139,7 +139,7 @@ struct Palette { /// A map of indices in the palette to a count of pixels in app
 // when the field had attributes
 struct FieldsWithAttributes {
     // Pre Comment
-    #[rustfmt_skip] pub host:String, // Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB
+    #[rustfmt::skip] pub host:String, // Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB
     //Another pre comment
     #[attr1]
     #[attr2] pub id: usize // CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCC CCCCCCCCCCCC
diff --git a/tests/source/trait.rs b/tests/source/trait.rs
index b3cf4dae721..9f0c73694bf 100644
--- a/tests/source/trait.rs
+++ b/tests/source/trait.rs
@@ -89,7 +89,7 @@ trait AAAAAAAAAAAAAAAAAAA = BBBBBBBBBBBBBBBBBBB + CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
 trait AAAAAAAAAAAAAAAAAA = BBBBBBBBBBBBBBBBBBB + CCCCCCCCCCCCCCCCCCCCCCCCCCCCC + DDDDDDDDDDDDDDDDDDD;
 trait AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA<A, B, C, D, E> = FooBar;
 trait AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA<A, B, C, D, E> = FooBar;
-#[rustfmt_skip]
+#[rustfmt::skip]
 trait FooBar = Foo
     + Bar;
 
diff --git a/tests/source/unions.rs b/tests/source/unions.rs
index fc2908e2d9e..730ba980abb 100644
--- a/tests/source/unions.rs
+++ b/tests/source/unions.rs
@@ -4,7 +4,7 @@
                                                                        /// A Doc comment
 #[AnAttribute]
 pub union Foo {
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     f :   SomeType, // Comment beside a field
     f: SomeType, // Comment beside a field
     // Comment on a field
@@ -100,7 +100,7 @@ union Palette { /// A map of indices in the palette to a count of pixels in appr
 // when the field had attributes
 union FieldsWithAttributes {
     // Pre Comment
-    #[rustfmt_skip] pub host:String, // Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB
+    #[rustfmt::skip] pub host:String, // Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB
     //Another pre comment
     #[attr1]
     #[attr2] pub id: usize // CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCC CCCCCCCCCCCC
diff --git a/tests/target/comment4.rs b/tests/target/comment4.rs
index e07abf74a81..e2ef7de978f 100644
--- a/tests/target/comment4.rs
+++ b/tests/target/comment4.rs
@@ -47,5 +47,5 @@ fn debug_function() {
 
 #[link_section=".vectors"]
 #[no_mangle] // Test this attribute is preserved.
-#[cfg_attr(rustfmt, rustfmt_skip)]
+#[cfg_attr(rustfmt, rustfmt::skip)]
 pub static ISSUE_1284: [i32; 16] = [];
diff --git a/tests/target/configs/struct_field_align_threshold/20.rs b/tests/target/configs/struct_field_align_threshold/20.rs
index f6ee4ed1f0a..f952775f5f2 100644
--- a/tests/target/configs/struct_field_align_threshold/20.rs
+++ b/tests/target/configs/struct_field_align_threshold/20.rs
@@ -36,7 +36,7 @@ fn main() {
 /// A Doc comment
 #[AnAttribute]
 pub struct Foo {
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     f :   SomeType, // Comment beside a field
     f: SomeType, // Comment beside a field
     // Comment on a field
@@ -171,8 +171,8 @@ struct Palette {
 // when the field had attributes
 struct FieldsWithAttributes {
     // Pre Comment
-    #[rustfmt_skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
-                                      * BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
+    #[rustfmt::skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
+                                       * BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
     // Another pre comment
     #[attr1]
     #[attr2]
diff --git a/tests/target/configs/use_field_init_shorthand/false.rs b/tests/target/configs/use_field_init_shorthand/false.rs
index dcebe0b6f1d..74330446886 100644
--- a/tests/target/configs/use_field_init_shorthand/false.rs
+++ b/tests/target/configs/use_field_init_shorthand/false.rs
@@ -9,7 +9,7 @@ fn main() {
         y: y,
         #[attr]
         z: z,
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         skipped: skipped,
     };
 }
diff --git a/tests/target/configs/use_field_init_shorthand/true.rs b/tests/target/configs/use_field_init_shorthand/true.rs
index ad78093ee8e..8b80e81534b 100644
--- a/tests/target/configs/use_field_init_shorthand/true.rs
+++ b/tests/target/configs/use_field_init_shorthand/true.rs
@@ -9,7 +9,7 @@ fn main() {
         y,
         #[attr]
         z,
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         skipped: skipped,
     };
 }
diff --git a/tests/target/enum.rs b/tests/target/enum.rs
index e429e45287e..b19b6997826 100644
--- a/tests/target/enum.rs
+++ b/tests/target/enum.rs
@@ -65,7 +65,7 @@ pub enum EnumWithAttributes {
     TupleVar(usize, usize, usize), /* AAAA AAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAA
                                     * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA */
     // Pre Comment
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     SkippedItem(String,String,), // Post-comment
     #[another_attr]
     #[attr2]
diff --git a/tests/target/fn.rs b/tests/target/fn.rs
index b78a8b5b21e..66a6e9082de 100644
--- a/tests/target/fn.rs
+++ b/tests/target/fn.rs
@@ -92,7 +92,7 @@ fn inner() {
     x
 }
 
-#[cfg_attr(rustfmt, rustfmt_skip)]
+#[cfg_attr(rustfmt, rustfmt::skip)]
 fn foo(a: i32) -> i32 {
     // comment
     if a > 0 { 1 } else { 2 }
diff --git a/tests/target/match.rs b/tests/target/match.rs
index fe565f4c154..7ed49c61f1d 100644
--- a/tests/target/match.rs
+++ b/tests/target/match.rs
@@ -51,7 +51,7 @@ fn foo() {
         #[an_attribute]
         // Comment after an attribute.
         None => 0,
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         Blurb     =>     {                  }
     };
 }
@@ -109,7 +109,7 @@ fn matches() {
 
 fn match_skip() {
     let _ = match Some(1) {
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         Some( n ) => n,
         None => 1,
     };
diff --git a/tests/target/multiple.rs b/tests/target/multiple.rs
index 446b4357de3..832567fdf7e 100644
--- a/tests/target/multiple.rs
+++ b/tests/target/multiple.rs
@@ -58,7 +58,7 @@ fn baz<
     extern crate foo;
 }
 
-#[rustfmt_skip]
+#[rustfmt::skip]
 fn qux(a: dadsfa,   // Comment 1
        b: sdfasdfa, // Comment 2
        c: dsfdsafa) // Comment 3
@@ -103,7 +103,7 @@ pub trait GraphWalk<'a, N, E> {
 /// A Doc comment
 #[AnAttribute]
 pub struct Foo {
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     f :   SomeType, // Comment beside a field
     f: SomeType, // Comment beside a field
     // Comment on a field
@@ -172,7 +172,7 @@ fn deconstruct(
 ) {
 }
 
-#[rustfmt_skip]
+#[rustfmt::skip]
 mod a{
 fn foo(x:    T) {
     let x:    T = dfasdf;
diff --git a/tests/target/skip.rs b/tests/target/skip.rs
index ee2094151cf..6c9737a3377 100644
--- a/tests/target/skip.rs
+++ b/tests/target/skip.rs
@@ -12,13 +12,13 @@ fn foo(
 }
 
 impl LateLintPass for UsedUnderscoreBinding {
-    #[cfg_attr(rustfmt, rustfmt_skip)]
+    #[cfg_attr(rustfmt, rustfmt::skip)]
     fn check_expr() { // comment
     }
 }
 
 fn issue1346() {
-    #[cfg_attr(rustfmt, rustfmt_skip)]
+    #[cfg_attr(rustfmt, rustfmt::skip)]
     Box::new(self.inner.call(req).then(move |result| {
         match result {
             Ok(resp) => Box::new(future::done(Ok(resp))),
@@ -46,7 +46,7 @@ fn skip_on_statements() {
     }
 
     // Semi
-    #[cfg_attr(rustfmt, rustfmt_skip)]
+    #[cfg_attr(rustfmt, rustfmt::skip)]
     foo(
         1, 2, 3, 4,
         1, 2,
@@ -54,15 +54,15 @@ fn skip_on_statements() {
     );
 
     // Local
-    #[cfg_attr(rustfmt, rustfmt_skip)]
+    #[cfg_attr(rustfmt, rustfmt::skip)]
     let x = foo(  a,   b  ,  c);
 
     // Item
-    #[cfg_attr(rustfmt, rustfmt_skip)]
+    #[cfg_attr(rustfmt, rustfmt::skip)]
     use foobar;
 
     // Mac
-    #[cfg_attr(rustfmt, rustfmt_skip)]
+    #[cfg_attr(rustfmt, rustfmt::skip)]
     vec![
         1, 2, 3, 4,
         1, 2, 3, 4,
@@ -74,7 +74,7 @@ fn skip_on_statements() {
     ];
 
     // Expr
-    #[cfg_attr(rustfmt, rustfmt_skip)]
+    #[cfg_attr(rustfmt, rustfmt::skip)]
     foo(  a,   b  ,  c)
 }
 
diff --git a/tests/target/skip_mod.rs b/tests/target/skip_mod.rs
index 38ece8f070d..d770ab349f4 100644
--- a/tests/target/skip_mod.rs
+++ b/tests/target/skip_mod.rs
@@ -1,3 +1,3 @@
-#![rustfmt_skip]
+#![rustfmt::skip]
 use a ::  b
 ;
diff --git a/tests/target/structs.rs b/tests/target/structs.rs
index 7f9ef1e6164..368650bb6a8 100644
--- a/tests/target/structs.rs
+++ b/tests/target/structs.rs
@@ -4,7 +4,7 @@
 /// A Doc comment
 #[AnAttribute]
 pub struct Foo {
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     f :   SomeType, // Comment beside a field
     f: SomeType, // Comment beside a field
     // Comment on a field
@@ -144,8 +144,8 @@ struct Palette {
 // when the field had attributes
 struct FieldsWithAttributes {
     // Pre Comment
-    #[rustfmt_skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
-                                      * BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
+    #[rustfmt::skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
+                                       * BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
     // Another pre comment
     #[attr1]
     #[attr2]
diff --git a/tests/target/trait.rs b/tests/target/trait.rs
index ed7d3bc56f1..a6bc2d89689 100644
--- a/tests/target/trait.rs
+++ b/tests/target/trait.rs
@@ -127,7 +127,7 @@ trait AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
     D,
     E,
 > = FooBar;
-#[rustfmt_skip]
+#[rustfmt::skip]
 trait FooBar = Foo
     + Bar;
 
diff --git a/tests/target/unions.rs b/tests/target/unions.rs
index 6de682297af..386ceb3836c 100644
--- a/tests/target/unions.rs
+++ b/tests/target/unions.rs
@@ -4,7 +4,7 @@
 /// A Doc comment
 #[AnAttribute]
 pub union Foo {
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     f :   SomeType, // Comment beside a field
     f: SomeType, // Comment beside a field
     // Comment on a field
@@ -100,8 +100,8 @@ union Palette {
 // when the field had attributes
 union FieldsWithAttributes {
     // Pre Comment
-    #[rustfmt_skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
-                                      * BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
+    #[rustfmt::skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
+                                       * BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
     // Another pre comment
     #[attr1]
     #[attr2]