Skip to content

Commit 1b21803

Browse files
committed
Emit allow soft_unstable as a temporary workaround for rustfmt::skip
Issue: #551
1 parent 191d5e5 commit 1b21803

17 files changed

+19
-0
lines changed

protobuf-codegen/src/code_writer.rs

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ impl<'a> CodeWriter<'a> {
6262
self.write_line("#![allow(clippy::all)]");
6363
self.write_line("");
6464
self.write_line("#![allow(unused_attributes)]");
65+
// TODO: figure out how to fix rustfmt properly
66+
self.write_line("#[allow(soft_unstable)]");
6567
self.write_line("#![rustfmt::skip]");
6668
self.write_line("");
6769
self.write_line("#![allow(box_pointers)]");

protobuf-codegen/src/well_known_types.rs

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ pub(crate) fn gen_well_known_types_mod(
119119

120120
w.write_line("");
121121
w.write_line("#![allow(unused_attributes)]");
122+
// TODO: figure out how to fix rustfmt properly
123+
w.write_line("#[allow(soft_unstable)]");
122124
w.write_line("#![rustfmt::skip]");
123125

124126
w.write_line("");

protobuf/src/descriptor.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/doctest_pb.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/plugin.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/rustproto.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/any.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/api.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/duration.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/empty.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/field_mask.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//! [This document](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) describes these types.
66
77
#![allow(unused_attributes)]
8+
#[allow(soft_unstable)]
89
#![rustfmt::skip]
910

1011
mod any;

protobuf/src/well_known_types/source_context.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/struct_pb.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/timestamp.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/type_pb.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

protobuf/src/well_known_types/wrappers.rs

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

99
#![allow(unused_attributes)]
10+
#[allow(soft_unstable)]
1011
#![rustfmt::skip]
1112

1213
#![allow(box_pointers)]

0 commit comments

Comments
 (0)