rust-analyzer version: 0.3.2921-standalone
rustc version: shouldn't matter
editor or extension: VS Code
relevant settings: none
code snippet to reproduce:
// benches/bench.rs
fn main() {}
Clicking the "▶Run" lens results in this terminal output:
error: unexpected argument '--bench' found
tip: to pass '--bench' as a value, use '-- --bench'
Usage: cargo run --package [<SPEC>] [ARGS]...
For more information, try '--help'.
It looks like #21948 was never properly fixed, and instead the run button went from being absent to being non-functional.
Like integration tests, benchmarks cannot be run with cargo run (cargo run only supports binaries and examples). rust-analyzer correctly handles this for integration tests by invoking cargo test instead, but not for benchmarks, which need to be invoked through cargo bench.
The same problem occurs when the "rust-analyzer: Run" command in used inside the benchmark.
rust-analyzer already has the rust-analyzer.runnables.bench.command, the "Subcommand used for bench runnables instead of bench." which correctly defaults to bench, and which I haven't changed. Is this setting just ignored, or does it have other uses?
rust-analyzer version: 0.3.2921-standalone
rustc version: shouldn't matter
editor or extension: VS Code
relevant settings: none
code snippet to reproduce:
Clicking the "▶Run" lens results in this terminal output:
It looks like #21948 was never properly fixed, and instead the run button went from being absent to being non-functional.
Like integration tests, benchmarks cannot be run with
cargo run(cargo runonly supports binaries and examples). rust-analyzer correctly handles this for integration tests by invokingcargo testinstead, but not for benchmarks, which need to be invoked throughcargo bench.The same problem occurs when the "rust-analyzer: Run" command in used inside the benchmark.
rust-analyzer already has the
rust-analyzer.runnables.bench.command, the "Subcommand used for bench runnables instead ofbench." which correctly defaults tobench, and which I haven't changed. Is this setting just ignored, or does it have other uses?