diff --git a/src/lib.rs b/src/lib.rs index 1d91c5ac6b..2866421707 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -252,7 +252,6 @@ #![doc(html_root_url = "https://docs.rs/syn/2.0.36")] #![cfg_attr(doc_cfg, feature(doc_cfg))] #![allow(non_camel_case_types)] -#![allow(repr_transparent_external_private_fields)] // False positive: https://github.com/rust-lang/rust/issues/78586#issuecomment-1722680482 #![allow( clippy::bool_to_int_with_if, clippy::cast_lossless, diff --git a/src/token.rs b/src/token.rs index e0950ee0b4..af7f25c42b 100644 --- a/src/token.rs +++ b/src/token.rs @@ -143,6 +143,7 @@ mod private { /// Support writing `token.span` rather than `token.spans[0]` on tokens that /// hold a single span. #[repr(transparent)] + #[allow(unknown_lints, repr_transparent_external_private_fields)] // False positive: https://github.com/rust-lang/rust/issues/78586#issuecomment-1722680482 pub struct WithSpan { pub span: Span, } @@ -365,6 +366,7 @@ macro_rules! define_punctuation_structs { ($($token:literal pub struct $name:ident/$len:tt #[doc = $usage:literal])*) => { $( #[cfg_attr(not(doc), repr(transparent))] + #[allow(unknown_lints, repr_transparent_external_private_fields)] // False positive: https://github.com/rust-lang/rust/issues/78586#issuecomment-1722680482 #[doc = concat!('`', $token, '`')] /// /// Usage: