Closed
Description
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