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
Running an individual test by clicking Run Test does not respect the rust-analyzer.cargo.noDefaultFeatures setting.
In this minimal reproducible example, in .vscode/settings.json, default features have been turned off and the "blue" feature has been enabled. When running the test, the command executed is:
cargo test \
--package mre-cargo-test-default-features \
--lib \
--features blue \
-- \
tests::fails_with_default_features \
--exact \
--nocapture
i.e. it is respecting the "rust-analyzer.cargo.features": ["blue"], but not "rust-analyzer.cargo.noDefaultFeatures": true, and the test fails. Interestingly the code guarded by #[cfg(feature = "red")] is greyed out before clicking Run Test.
The text was updated successfully, but these errors were encountered:
rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
rust-analyzer version: 0.3.1162-standalone (634cfe3 2022-08-07)
rustc version: (eg. output of
rustc -V
)rustc 1.63.0 (4b91a6ea7 2022-08-08)
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTUP_HOME
orCARGO_HOME
)Visual Studio Code version details
Version: 1.70.1
Commit: 6d9b74a70ca9c7733b29f0456fd8195364076dda
Date: 2022-08-10T06:09:06.916Z (2 days ago)
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin x64 21.6.0
Running an individual test by clicking
Run Test
does not respect therust-analyzer.cargo.noDefaultFeatures
setting.In this minimal reproducible example, in
.vscode/settings.json
, default features have been turned off and the "blue" feature has been enabled. When running the test, the command executed is:cargo test \ --package mre-cargo-test-default-features \ --lib \ --features blue \ -- \ tests::fails_with_default_features \ --exact \ --nocapture
i.e. it is respecting the
"rust-analyzer.cargo.features": ["blue"]
, but not"rust-analyzer.cargo.noDefaultFeatures": true
, and the test fails. Interestingly the code guarded by#[cfg(feature = "red")]
is greyed out before clickingRun Test
.The text was updated successfully, but these errors were encountered: