Initially reported by @e-oz here.
[playground]
fn main() {
println!("Hello, world!");
}
#[bench]
fn example() {}
On stable, you're allowed to define #[bench] tests in your library, even if calling them requires nightly. This broke at least one stable user, so we should at least consider continuing to ignore #[bench]-annotated functions when not run via cargo bench.
Is there some way to get a crater run to determine which libraries are using #[bench] in an otherwise stable crate, so we can suggest that they move benchmarks into a dedicated folder?
Initially reported by @e-oz here.
[playground]
On stable, you're allowed to define
#[bench]tests in your library, even if calling them requires nightly. This broke at least one stable user, so we should at least consider continuing to ignore#[bench]-annotated functions when not run viacargo bench.Is there some way to get a crater run to determine which libraries are using
#[bench]in an otherwise stable crate, so we can suggest that they move benchmarks into a dedicated folder?