Debug bench function in bench target rise "Multiple compilation artifacts are not supported." error

Viewed 38

env: Use VScode + RA with nightly Rust toolchain.

e.g. bench.rs file

#![feature(test)]

extern crate test;
use test::*;

#[bench]
fn demo(b:& Bencher){
       ...

}

When click Debug lens trigger "Multiple compilation artifacts are not supported" error, but click Run Bench works normally.

Ironically, if you put the demo fn in other bin lib test example target everything works fine. Why debug bench fn in bench target occur problems?

1 Answers
Related