Closed
Description
Initially reported by @e-oz here.
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?
Metadata
Metadata
Assignees
Labels
Area: `#[test]` / the `test` libraryArea: `#[stable]`, `#[unstable]` etc.High priorityRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.Performance or correctness regression from stable to beta.