-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
"#![feature] may not be used on the stable release channel" #192
Comments
I am not able to reproduce this. $ cargo tree
testing v0.0.0
└── thiserror v1.0.35
└── thiserror-impl v1.0.35 (proc-macro)
├── proc-macro2 v1.0.43
│ └── unicode-ident v1.0.3
├── quote v1.0.21
│ └── proc-macro2 v1.0.43 (*)
└── syn v1.0.99
├── proc-macro2 v1.0.43 (*)
├── quote v1.0.21 (*)
└── unicode-ident v1.0.3
$ cargo +stable check
Compiling proc-macro2 v1.0.43
Compiling quote v1.0.21
Compiling unicode-ident v1.0.3
Compiling syn v1.0.99
Compiling thiserror v1.0.35
Compiling thiserror-impl v1.0.35
Checking testing v0.0.0
Finished dev [unoptimized + debuginfo] target(s) in 4.47s
$ rustc +stable --version
rustc 1.63.0 (4b91a6ea7 2022-08-08) |
That is very weird. I just left the computer but will try again tomorrow. This was a fresh "cargo new --lib" project with thiserror as the only dependency and no code. |
Okay. I'll close for now but we can reopen if you or anyone else is able to provide repro steps. |
Okay. I created a new project this morning and I can't replicate it either. I have to admit that I didn't expect that behavior of |
If you are using an old rust-analyzer or intellij-rust, try upgrading because buggy past versions of those can screw up the |
Thanks for the hint. I am using intellij-rust but it's the very latest version. So, there might still be a bug there. |
I have the same problem. But |
I was able to reproduce this issue. And yes, I am using rust-analyzer on VSCode, if that makes a difference. It seems to be caused by using this lib on one project that uses a Nightly build, then switching to a project that uses a Stable build. Running Cargo clean does fix the issue. |
This seems to be an issue in On this line the build script checks for the This setting is enabled by default, and my guess is that it returns a successful status code when A temporary workaround is to pin the |
If there is a rust-analyzer bug, please report it to https://github.com/rust-lang/rust-analyzer. |
To me it seems like |
What in thiserror assumes that? |
As per my previous comment: This seems to be an issue in On this line the build script checks for the This setting is enabled by default, and my guess is that it returns a successful status code when A temporary workaround is to pin the |
That is literally the opposite of assuming though, right? It checks whether the toolchain supports nightly flags. If rust-analyzer randomly enables or does not enable nightly flags during the course of the same build, that would be a rust-analyzer bug. |
Is there a definition on what the status code is that the |
Rust-analyzer's RUSTC_WRAPPER exit code is the same as the underlying rustc command exit code so I don't expect that would be the issue in this case. See https://github.com/rust-lang/rust-analyzer/blob/ee2d9eddb6f31773a507c918553214cb816a0abe/crates/rust-analyzer/src/bin/rustc_wrapper.rs#L50. |
At this point I feel like we're just keeping the "I use 4-month-old rust-analyzer (or intellij) because I enjoy hitting bugs that were already fixed in those projects 3 months ago" crowd entertained, so I'll lock this issue from further discussion at this point. |
This works in 1.0.34 and before.
I tried this on an otherwise totally empty project. Happy to share more details. The docs don't mention that a nightly version is required so I assume this was unintentional?
The text was updated successfully, but these errors were encountered: