Skip to content

Commit f39159e

Browse files
committed
Replace rustfmt::skip with cfg_attr(rustfmt, rustfmt::skip)
As temporary work around for #551
1 parent ed025f2 commit f39159e

File tree

14 files changed

+14
-14
lines changed

14 files changed

+14
-14
lines changed

protobuf-codegen/src/code_writer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<'a> CodeWriter<'a> {
5858
self.write_line("#![allow(clippy::all)]");
5959
self.write_line("");
6060
self.write_line("#![allow(unused_attributes)]");
61-
self.write_line("#![rustfmt::skip]");
61+
self.write_line("#![cfg_attr(rustfmt, rustfmt::skip)]");
6262
self.write_line("");
6363
self.write_line("#![allow(box_pointers)]");
6464
self.write_line("#![allow(dead_code)]");

protobuf/src/descriptor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/plugin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/rustproto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/any.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/api.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/duration.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/empty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/field_mask.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/source_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/struct_pb.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/timestamp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/type_pb.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

protobuf/src/well_known_types/wrappers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![allow(clippy::all)]
77

88
#![allow(unused_attributes)]
9-
#![rustfmt::skip]
9+
#![cfg_attr(rustfmt, rustfmt::skip)]
1010

1111
#![allow(box_pointers)]
1212
#![allow(dead_code)]

0 commit comments

Comments
 (0)