Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up#[bench] attribute is stable and test crate can be replaced #38998
Comments
brson
added
I-wrong
T-libs
labels
Jan 11, 2017
brson
changed the title
#[bench] is stable and test crate can be replaced
#[bench] attribute is stable and test crate can be replaced
Jan 11, 2017
This comment has been minimized.
This comment has been minimized.
|
As I said in that comment, I found zero evidence that anyone else used benchmarks this way or even knew it was possible. None of rustc-test’s reverse dependencies use As to exposing test API’s, that’s only API of the |
Mark-Simulacrum
added
A-libtest
C-bug
and removed
I-wrong
labels
Jul 26, 2017
This comment has been minimized.
This comment has been minimized.
DrRibosome
commented
Oct 20, 2017
|
Hmm, ive been using this to get bench on stable for a bit now (but I dont have crates pushed to crates.io). It would be annoying for sure if this broke given that benching is useful, but I want to work on stable |
This comment has been minimized.
This comment has been minimized.
|
Since my previous comment, std made a breaking change to the unstable private data structures that |
brson commentedJan 11, 2017
•
edited
Per @SimonSapin's comment. It is possible to swap out the test crate via cargo and get the
#[bench]functionality on stable.This has been abused in the wild for a long time, and is a fairly major blunder. Swapping out the test crate exposes a large swath of ad-hoc test API's to the stable ecosystem (rustc generates calls to these APIs).
Fixing this will require providing a plausible alternative and a long deprecation and migration period.