Open wcarmon opened 1 year ago
What command (highlighted line) does the plugin show when performing a build in your case?
Here's an MWE:
in main.rs
mod erase;
fn main() {
println!("hi");
}
in erase.rs
(same directory as main.rs
)
struct A {}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn foo() {
nothing; // <-- this is not defined anywhere, so fails on cargo test, but succeeds on cargo build
}
}
Console output after CTRL+F9
:
/home/wcarmon/.cargo/bin/cargo build --message-format=json-diagnostic-rendered-ansi --color=always --bin my-project --manifest-path /path/to/my-project/Cargo.toml
Compiling my-project v0.0.1 (/path/to/my-project)
Finished dev [unoptimized + debuginfo] target(s) in 0.51s
Process finished with exit code 0
it looks like your build command runs cargo build
with --all
and --all-targets
. How do I get that behavior for CTRL+F9
?
Environment
org.rust.lang (0.4.183.5026-222)
Rust toolchain version:
rustc 1.67.0-nightly (b833ad56f 2022-11-18)
IDE name and version:
GoLand 2022.2.4
Operating system:
Linux 5.4.0-128-generic #144-Ubuntu x86_64 x86_64 x86_64 GNU/Linux
Problem description
Steps to reproduce
Is there a way to get "build" to show problems in test modules?