Skip to content

Commit 228503f

Browse files
committed
Work around new dead_code warning
warning: field `0` is never read --> src/marker.rs:15:39 | 15 | pub(crate) struct ProcMacroAutoTraits(Rc<()>); | ------------------- ^^^^^^ | | | field in this struct | = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 15 | pub(crate) struct ProcMacroAutoTraits(()); | ~~
1 parent 2a9b955 commit 228503f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mod value {
1212
pub(crate) use core::marker::PhantomData as Marker;
1313
}
1414

15-
pub(crate) struct ProcMacroAutoTraits(Rc<()>);
15+
pub(crate) struct ProcMacroAutoTraits(#[allow(dead_code)] Rc<()>);
1616

1717
impl UnwindSafe for ProcMacroAutoTraits {}
1818
impl RefUnwindSafe for ProcMacroAutoTraits {}

tests/ui/test-not-send.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ error[E0277]: `Rc<()>` cannot be sent between threads safely
3131
note: required because it appears within the type `proc_macro2::marker::ProcMacroAutoTraits`
3232
--> $WORKSPACE/src/marker.rs
3333
|
34-
| pub(crate) struct ProcMacroAutoTraits(Rc<()>);
34+
| pub(crate) struct ProcMacroAutoTraits(#[allow(dead_code)] Rc<()>);
3535
| ^^^^^^^^^^^^^^^^^^^
3636
note: required because it appears within the type `PhantomData<proc_macro2::marker::ProcMacroAutoTraits>`
3737
--> $RUST/core/src/marker.rs

0 commit comments

Comments
 (0)