Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dtolnay/proc-macro2
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.75
Choose a base ref
...
head repository: dtolnay/proc-macro2
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.0.76
Choose a head ref
  • 4 commits
  • 4 files changed
  • 1 contributor

Commits on Jan 6, 2024

  1. 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(());
           |                                       ~~
    dtolnay committed Jan 6, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Copy the full SHA
    228503f View commit details
  2. 2

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Copy the full SHA
    436ce07 View commit details
  3. Merge pull request #435 from dtolnay/deadcode

    Work around new dead_code warning
    dtolnay authored Jan 6, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Copy the full SHA
    534bb81 View commit details
  4. Release 1.0.76

    dtolnay committed Jan 6, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Copy the full SHA
    ea778eb View commit details
Showing with 7 additions and 4 deletions.
  1. +1 −1 Cargo.toml
  2. +1 −1 src/lib.rs
  3. +4 −1 src/marker.rs
  4. +1 −1 tests/ui/test-not-send.stderr
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "proc-macro2"
version = "1.0.75"
version = "1.0.76"
authors = ["David Tolnay <dtolnay@gmail.com>", "Alex Crichton <alex@alexcrichton.com>"]
autobenches = false
categories = ["development-tools::procedural-macro-helpers"]
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@
//! a different thread.
// Proc-macro2 types in rustdoc of other crates get linked to here.
#![doc(html_root_url = "https://docs.rs/proc-macro2/1.0.75")]
#![doc(html_root_url = "https://docs.rs/proc-macro2/1.0.76")]
#![cfg_attr(any(proc_macro_span, super_unstable), feature(proc_macro_span))]
#![cfg_attr(super_unstable, feature(proc_macro_def_site))]
#![cfg_attr(doc_cfg, feature(doc_cfg))]
5 changes: 4 additions & 1 deletion src/marker.rs
Original file line number Diff line number Diff line change
@@ -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
@@ -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