Skip to content

Commit fbe3bc2

Browse files
committed
Work around unknown_lints warning on rustc older than 1.64
warning: unknown lint: `repr_transparent_external_private_fields` --> src/lib.rs:255:10 | 255 | #![allow(repr_transparent_external_private_fields)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unknown_lints)]` on by default
1 parent 75cf912 commit fbe3bc2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@
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
256255
#![allow(
257256
clippy::bool_to_int_with_if,
258257
clippy::cast_lossless,

src/token.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ mod private {
143143
/// Support writing `token.span` rather than `token.spans[0]` on tokens that
144144
/// hold a single span.
145145
#[repr(transparent)]
146+
#[allow(unknown_lints, repr_transparent_external_private_fields)] // False positive: https://github.com/rust-lang/rust/issues/78586#issuecomment-1722680482
146147
pub struct WithSpan {
147148
pub span: Span,
148149
}
@@ -365,6 +366,7 @@ macro_rules! define_punctuation_structs {
365366
($($token:literal pub struct $name:ident/$len:tt #[doc = $usage:literal])*) => {
366367
$(
367368
#[cfg_attr(not(doc), repr(transparent))]
369+
#[allow(unknown_lints, repr_transparent_external_private_fields)] // False positive: https://github.com/rust-lang/rust/issues/78586#issuecomment-1722680482
368370
#[doc = concat!('`', $token, '`')]
369371
///
370372
/// Usage:

0 commit comments

Comments
 (0)