You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Intermittent "feature cannot be used on stable release channel" #526
I temporarily got this error trying to build rustix as a dependency:
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /Users/jyn/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.4/src/lib.rs:99:26
|
99 | #![cfg_attr(rustc_attrs, feature(rustc_attrs))]
| ^^^^^^^^^^^^^^^^^^^^
I have unfortunately not been able to reproduce this error; I updated the version of rustix, which I originally thought fixed the issue, but when I downgraded to 0.36.4 I couldn't reproduce it again.
I think the build script needs to have rerun-if-env-changed=RUSTC or something like that? If it helps, my default toolchain is nightly but I have a rust-toolchain file that says to use 1.65.
Reacted by ccptr, Gabriel Comte, Don Park, Marat Radchenko, Jiri Daněk, Rogério Almeida, Joseph Koshakow, Brent Gardner, Edgar Onghena, Sahan Fernando and 9 more
I have this very error popping in my various projects (95% of the time related to rustix). A simple cargo clean is a fix, but it forces me to fully recompile big projects, which is slightly annoying.
Sometimes just adding a new dependency to my projects triggers it.
I submitted #544 in hopes that it may help. However, I don't yet have a reliable way to reproduce the problem locally, so I can't say for sure whether it does.
I have this very error popping in my various projects (95% of the time related to rustix). A simple cargo clean is a fix, but it forces me to fully recompile big projects, which is slightly annoying.
@p-kraszewski as a workaround, you can use cargo clean -p rustix to only recompile rustix instead of all your dependencies
Reacted by Jeff Martin, Klas Segeljakt, Martin Simons and Valerio Viperino
I just saw an instance of the same issue with rustix v0.37.20. rm -rf target fixed it, but I'm not sure how to reproduce. Might have been related to me starting a build simultaneously from the command line and from inside vscode with rust-analyzer.
This did also happen to me on 0.37.24.
The only thing I did was a cargo update followed by a cargo clippy.
As mentioned above doing cargo clean -p rustix solved the issue.
Encountered this with rustix 0.37.27, cargo clean and deleting the target directory does not fix it for me. This only happens on rust analyzer for some reason (yes I did restart the server and vs code too), compiling from the command line works perfectly fine.
Reacted by Michał Borejszo, Marat Radchenko and Samuel Doiron
This seems unrelated to rust-analyzer itself, the thing is, using stable rust a project referencing rustix will fail with this error on cargo check (or cargo clippy), but build fine w/o errors on cargo build. Strange.
Activity
jyn514 commentedon Jan 25, 2023
cc rust-lang/cargo#10367
intgr commentedon Jan 30, 2023
FWIW running
rm -rf targetto delete the cache fixed this issue for me.p-kraszewski commentedon Feb 24, 2023
I have this very error popping in my various projects (95% of the time related to
rustix). A simplecargo cleanis a fix, but it forces me to fully recompile big projects, which is slightly annoying.Sometimes just adding a new dependency to my projects triggers it.
Add more `cargo:rerun-if-env-changed`'s to build.rs
sunfishcode commentedon Feb 24, 2023
I submitted #544 in hopes that it may help. However, I don't yet have a reliable way to reproduce the problem locally, so I can't say for sure whether it does.
jyn514 commentedon Feb 24, 2023
@p-kraszewski as a workaround, you can use
cargo clean -p rustixto only recompile rustix instead of all your dependenciesAdd more `cargo:rerun-if-env-changed`'s to build.rs (#544)
sunfishcode commentedon Mar 3, 2023
#544, which may fix this, is now released in version 0.37.
Add more `cargo:rerun-if-env-changed`'s to build.rs (#544)
Add more `cargo:rerun-if-env-changed`'s to build.rs (#544)
sunfishcode commentedon Mar 29, 2023
Does anyone who encountered this issue continue to see it with 0.37, or 0.36.11?
p-kraszewski commentedon Mar 29, 2023
Not encountered within at least the last 2 weeks. Thank you.
Remove some rerun-if-env-changed lines from build.rs.
Remove some rerun-if-env-changed lines from build.rs. (#576)
mschneider commentedon Apr 8, 2023
just encountered it with rustix 0.37.7
5 remaining items
Luthaf commentedon Jun 30, 2023
I just saw an instance of the same issue with rustix v0.37.20.
rm -rf targetfixed it, but I'm not sure how to reproduce. Might have been related to me starting a build simultaneously from the command line and from inside vscode with rust-analyzer.JohnDowson commentedon Jul 26, 2023
Encountered this with
rustix-0.38.4ynhame commentedon Oct 3, 2023
This did also happen to me on
0.37.24.The only thing I did was a
cargo updatefollowed by acargo clippy.As mentioned above doing
cargo clean -p rustixsolved the issue.ptdecker commentedon Oct 4, 2023
Encountered this with rustix-0.38.4.
Here is a partial cargo tree of my project indicating which of my dependencies are using this package:
benjaminleonard commentedon Oct 10, 2023
Ran into this issue with
rustix 0.37.23– after a fresh install. Fixed by running:cargo clean -p rustixAdd more `cargo:rerun-if-env-changed`'s to build.rs (#544)
Remove some rerun-if-env-changed lines from build.rs. (#576)
Add more `cargo:rerun-if-env-changed`'s to build.rs (#544)
Remove some rerun-if-env-changed lines from build.rs. (#576)
Add more `cargo:rerun-if-env-changed`'s to build.rs (#544)
Remove some rerun-if-env-changed lines from build.rs. (#576)
Add more `cargo:rerun-if-env-changed`'s to build.rs (#544)
Remove some rerun-if-env-changed lines from build.rs. (#576)
theRookieCoder commentedon Feb 20, 2024
Encountered this with
rustix 0.37.27,cargo cleanand deleting thetargetdirectory does not fix it for me. This only happens on rust analyzer for some reason (yes I did restart the server and vs code too), compiling from the command line works perfectly fine.spitfire05 commentedon Feb 20, 2024
This seems unrelated to rust-analyzer itself, the thing is, using stable rust a project referencing rustix will fail with this error on
cargo check(orcargo clippy), but build fine w/o errors oncargo build. Strange.