Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown feature proc_macro_span_shrink #356

Closed
rohit123sinha456 opened this issue Oct 5, 2022 · 3 comments · May be fixed by Waayway/windows-volume-control#6
Closed

Unknown feature proc_macro_span_shrink #356

rohit123sinha456 opened this issue Oct 5, 2022 · 3 comments · May be fixed by Waayway/windows-volume-control#6

Comments

@rohit123sinha456
Copy link

proc-macro2 is a dependent library of the anchor framework. Whenever I am doing a anchor build, the build fails showing the following error :-

If somebody can please help with this..

error[E0635]: unknown feature proc_macro_span_shrink
--> /Users/rohitsinha/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.46/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 due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

P.S Thanks in advance for any help.

@dtolnay dtolnay changed the title could not compile proc-macro2 due to previous error Unknown feature proc_macro_span_shrink Oct 5, 2022
@taiki-e
Copy link

taiki-e commented Oct 7, 2022

See #348 (comment) and subsequent comments.

@dtolnay dtolnay closed this as completed Oct 7, 2022
@ericcornelissen
Copy link

For your information, wanted to raise that I'm seeing this ~exact error on the nightly toolchain (specifically rust version 1.72.0-nightly (330727467 2023-06-29)) while not seeing it on the latest stable version (reference builds):

error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.58/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
warning: build failed, waiting for other jobs to finish...

I'm not quite sure what to make of it because this project's daily scheduled CI also runs tests on the nightly build, but I figured you might want to know (or, if it's preventable, this might help others as well).

@taiki-e
Copy link

taiki-e commented Jun 30, 2023

@ericcornelissen The problem you are seeing is different from the problem that was originally reported here.
AFAIK, you need to upgrade proc-macro2 to 1.0.60+, downgrade proc-macro2 to 1.0.43 or before, downgrade the nightly toolchain to nightly-2023-06-28 or before, or use a non-nightly toolchain.
See also rust-lang/rust#113152.

Repository owner locked and limited conversation to collaborators Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants