-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
rust-analyzer version: 0.3.2836-standalone
rustc version: rustc 1.94.0 (4a4ef493e 2026-03-02)
editor or extension: VS Code
relevant settings:
{
"rust-analyzer.cargo.cfgs": [
"debug_assertions",
"miri",
],
}code snippet to reproduce:
#[test]
#[cfg_attr(miri, ignore)]
fn mytest() {}Clicking on the "Run Test" lens will execute
cargo test --package hello --bin hello -- mytest --exact --nocapture --ignored
However, the test isn't actually ignored, so nothing will be run. rust-analyzer thinks the test is ignored because the settings enable the "miri" cfg.
While this is arguably my fault (enabling the "miri" cfg in rust-analyzer isn't really required or helpful), if rust-analyzer unconditionally passed --include-ignored instead of --ignored, the entire logic for conditionally injecting --ignored could be removed and this use case would Just Work™.
--include-ignored has been stable for half a decade, so there shouldn't be a problem with using it.