rust-lang / rust-lang/rust-analyzer
Warnings and errors not showing for no_std targets with `allTargets = false`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: rust-analyzer version: faaec86ff 2022-04-12 nightly
rustc version: rustc 1.60.0 (7737e0b5c 2022-04-04)
An embedded project of mine has run into a regression with RA in the most recent version that breaks all warning and error reporting.
To get the "no crate found for test" error disabled, I added a .vscode/settings.json with the following item:
{
"rust-analyzer.checkOnSave.allTargets": false,
}
However, once I've enabled this feature, error and warning reporting completely stops for the entire project.
If I enable all targets, the examples start to report warnings but the lib.rs throws an error about "no crate found for test".
My project is configured with a .cargo/config.toml:
[build]
target = "thumbv7em-none-eabihf"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the stated rust-analyzer and rustc versions, .vscode/settings.json setting checkOnSave.allTargets to false, and .cargo/config.toml targeting thumbv7em-none-eabihf. Compare diagnostics in lib.rs and the examples with all targets enabled and disabled; done means project warnings and errors appear without the reported unwanted test error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100