Skip to content

Regression building proc-macro2 1.0.59 with nightly-2023-06-28 #113152

Closed

Description

@davidv1992

How to fix it:

update proc-macro2 to the latest version.

proc_macro2 1.0.59 Fails to build with nightly-2023-06-28 but succeeds building on nightly-2023-06-27

Code

Create a new binary project with cargo new --bin buildtest

add dependency on proc_macro2 with proc_macro feature:

[dependencies]
proc-macro2 = { version = "=1.0.59", features=["default", "proc-macro"] }

Try building binary with cargo build, it will not work and fail with the following error:

error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/david/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.59/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to previous error

Version it worked on

It most recently worked on: nightly-2023-06-27

Version with regression

rustc --version --verbose:

rustc 1.72.0-nightly (5bd28f5ea 2023-06-28)
binary: rustc
commit-hash: 5bd28f5eac1ba3569bfa8d49ec3f5acbdfdff7a0
commit-date: 2023-06-28
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged

Activity

  1. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    and removed
    regression-untriagedUntriaged performance or correctness regression.
    on Jun 29, 2023
  2. Noratrieb commented on Jun 29, 2023

    @Noratrieb
    Member

    #111571 changed the feature gate. proc-macro2 is enabling the nightly feature that doesn't exist anymore. This is an issue with the proc-macro2 crate (cc @dtolnay).

    I'm going to leave this issue open for now so that other people can see it.

  3. added
    C-discussionCategory: Discussion or questions that doesn't represent real issues.
    and removed
    C-bugCategory: This is a bug.
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Jun 29, 2023
  4. pinned this issue on Jun 29, 2023
  5. Nemo157 commented on Jun 29, 2023

    @Nemo157
    Contributor

    It is fixed in proc-macro2 1.0.60+ dtolnay/proc-macro2#391

  6. davidv1992 commented on Jun 29, 2023

    @davidv1992
    ContributorAuthor

    Good to know it is intended breakage, will upgrade then.

  7. 79 remaining items

  8. added a commit that references this issue on Nov 29, 2023
  9. added a commit that references this issue on Dec 19, 2023
  10. added 2 commits that reference this issue on Dec 26, 2023
  11. added a commit that references this issue on Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-discussionCategory: Discussion or questions that doesn't represent real issues.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions