Skip to content

Commit

Permalink
Merge pull request #435 from dtolnay/deadcode
Browse files Browse the repository at this point in the history
Work around new dead_code warning
  • Loading branch information
dtolnay authored Jan 6, 2024
2 parents 2a9b955 + 436ce07 commit 534bb81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ mod value {
pub(crate) use core::marker::PhantomData as Marker;
}

pub(crate) struct ProcMacroAutoTraits(Rc<()>);
pub(crate) struct ProcMacroAutoTraits(
#[allow(dead_code)] // https://github.com/rust-lang/rust/issues/119645
Rc<()>,
);

impl UnwindSafe for ProcMacroAutoTraits {}
impl RefUnwindSafe for ProcMacroAutoTraits {}
2 changes: 1 addition & 1 deletion tests/ui/test-not-send.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ error[E0277]: `Rc<()>` cannot be sent between threads safely
note: required because it appears within the type `proc_macro2::marker::ProcMacroAutoTraits`
--> $WORKSPACE/src/marker.rs
|
| pub(crate) struct ProcMacroAutoTraits(Rc<()>);
| pub(crate) struct ProcMacroAutoTraits(
| ^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `PhantomData<proc_macro2::marker::ProcMacroAutoTraits>`
--> $RUST/core/src/marker.rs
Expand Down

0 comments on commit 534bb81

Please sign in to comment.