rust-analyzer: cargo check output not showing up
After upgrading to 0.2.166 I no longer see cargo check output in the edit pane.
The extension now runs cargo check almost immediately after each edit (and not just upon save) which is good because that cargo check comes back quickly enough.
However, none of the errors, including clippy warnings, are showing up. They are just silently swallowed.
I have to manually run cargo check on the command line and manually Ctrl-Click each error position to get there. The errors are no longer red-underlined. I wonder what has happened.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 38 (19 by maintainers)
@obmarg since schungx closed this issue and yours seems to be unrelated, can you please file a new one with the relevant details (repository URL, screenshots and so on)?
By default rust-analyzer passes
--all-featurestocargo check. You can use"rust-analyzer.cargo.allFeatures": falseto prevent this.@obmarg I figured it out.
There happens to be a feature in my
Cargo.tomlthat requires nightly, and my default toolchain is stable. This seems to be killing thecargo check. This seems to be the case even if the crate is pulled in only under a feature flag, ascargo checkseems to be checking it also.Downgraded to
0.2.159and it works fine. So it is something to do with version0.2.166There is another anomaly: In
0.2.159, when clicking onRun Test, it only compiles the test file in question. In0.2.166, when clicking onRun Test, it compiles all the test files.