Skip to content

Commit 75cf912

Browse files
committed
Ignore more repr_transparent_external_private_fields
warning: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types --> src/token.rs:378:17 | 378 | pub spans: [Span; $len], | ^^^^^^^^^^^^^^^^^^^^^^^ ... 560 | / define_punctuation_structs! { 561 | | "_" pub struct Underscore/1 /// wildcard patterns, inferred types, unnamed items in constants, extern c... 562 | | } | |_- in this macro invocation | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #78586 <rust-lang/rust#78586> = note: this struct contains `proc_macro2::Span`, which contains private fields, and makes it not a breaking change to become non-zero-sized in the future. = note: `#[warn(repr_transparent_external_private_fields)]` on by default = note: this warning originates in the macro `define_punctuation_structs` (in Nightly builds, run with -Z macro-backtrace for more info) warning: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types --> src/token.rs:378:17 | 378 | pub spans: [Span; $len], | ^^^^^^^^^^^^^^^^^^^^^^^ ... 785 | / define_punctuation! { 786 | | "&" pub struct And/1 /// bitwise and logical AND, borrow, references, reference patterns 787 | | "&&" pub struct AndAnd/2 /// lazy AND, borrow, references, reference patterns 788 | | "&=" pub struct AndEq/2 /// bitwise AND assignment ... | 831 | | "~" pub struct Tilde/1 /// unused since before Rust 1.0 832 | | } | |_- in this macro invocation | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #78586 <rust-lang/rust#78586> = note: this struct contains `proc_macro2::Span`, which contains private fields, and makes it not a breaking change to become non-zero-sized in the future. = note: this warning originates in the macro `define_punctuation_structs` which comes from the expansion of the macro `define_punctuation` (in Nightly builds, run with -Z macro-backtrace for more info) warning: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types --> src/token.rs:147:9 | 147 | pub span: Span, | ^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #78586 <rust-lang/rust#78586> = note: this struct contains `proc_macro2::Span`, which contains private fields, and makes it not a breaking change to become non-zero-sized in the future.
1 parent 299c782 commit 75cf912

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@
252252
#![doc(html_root_url = "https://docs.rs/syn/2.0.36")]
253253
#![cfg_attr(doc_cfg, feature(doc_cfg))]
254254
#![allow(non_camel_case_types)]
255+
#![allow(repr_transparent_external_private_fields)] // False positive: https://github.com/rust-lang/rust/issues/78586#issuecomment-1722680482
255256
#![allow(
256257
clippy::bool_to_int_with_if,
257258
clippy::cast_lossless,

0 commit comments

Comments
 (0)