-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
This is a tracking issue for the #[bench]
attribute and its stability in the compiler. Currently it is not possible to use this from stable Rust as it requires extern crate test
which is itself not stable.
Core APIs for benchmarking:
#[bench]
, which means the function should take a&mut Bencher
argument and will be run as part of regular tests (and specifically benchmarked with --bench passed to the test binary).
crate test {
mod bench {
#[derive(Clone)]
struct Bencher { ... }
impl Bencher {
fn iter<T, F>(&mut self, inner: F)
where
F: FnMut() -> T;
}
}
}
MOZGIII, tp, h4z31, LinusU, andrewbanchich and 16 more
Metadata
Metadata
Assignees
Labels
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.