-
Notifications
You must be signed in to change notification settings - Fork 480
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
'cargo check --all-targets --workspace' fails on stable #890
Comments
This is a common problem with all Rust crates running benchmarks using the built-in benchmark suite. A simple workaround is to use I would accept a patch to use criterion in benchmarks, but there is no motivation on our part to address this since this situation is so common. |
That doesn't help for vscode showing errors each time I open crossbeam. |
Ah, putting this into the settings helps:
I wonder if this should be the default for RA... |
Sadly that work-around doesn't work, since it will break on packages that don't have a libs crate. I don't think there is a way right now to configure RA globally that would just make this work. :/ |
So, I think " |
The lib crate could have unit tests disabled though. |
Unit tests don't seem disabled. $ cargo new --lib repro
$ cd repro
$ echo '#[test]
fn a() {
let _; // failed to compile
}
' > src/tests.rs
$ echo '#[cfg(test)] mod tests;' > src/lib.rs
$ cargo check --tests
Checking repro v0.1.0 (/Users/taiki/projects/tmp/c/repro)
error[E0282]: type annotations needed
--> src/tests.rs:3:9
|
3 | let _; // failed to compile
| ^
|
help: consider giving this pattern a type
|
3 | let _: _; // failed to compile
| +++
For more information about this error, try `rustc --explain E0282`. |
But you can disable them in
|
FWIW for now I have simply pinned my crossbeam folder to a nightly rustc to work around this. Crossbeam so far is the only crate I have encountered that is affected by this. (I can believe that it is common, there are simply not that many crates I submit patches to, and of the around two dozen or so, crossbeam is the only one with this problem.) |
Running
cargo check --all-targets --workspace
on stable fails with the following error:In particular this means opening crossbeam in vscode with rust-analyzer on a stable toolchain will show that error.
The text was updated successfully, but these errors were encountered: