Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why run cargo bench only using nightly? #44

Closed
florianjacob opened this issue Feb 4, 2016 · 3 comments
Closed

why run cargo bench only using nightly? #44

florianjacob opened this issue Feb 4, 2016 · 3 comments

Comments

@florianjacob
Copy link

The readme says:

automatically only run cargo bench when supported (nightly compiler)

Is that still true? cargo bench seemed to work just fine with stable rust (1.6). Are there any other reasons why cargo bench should run only on nightly?

The current behaviour causes issues like olivedae/harald#7 and needs workarounds like #33.

@huonw
Copy link
Owner

huonw commented Feb 4, 2016

The test crate and hence the test::Bencher type needed from it for benchmarks are unstable, and hence can only be used with a nightly compiler. (Note the automatic unstable feature passing is somewhat orthogonal to this: one can place benchmarks externally in benches/*.rs and hence benchmarks don't need #[cfg(feature = "...")] at all.)

@huonw huonw closed this as completed Feb 4, 2016
@huonw
Copy link
Owner

huonw commented Feb 4, 2016

For the feature passing, see, for instance, #5, or the end of the Example section of the README.

@florianjacob
Copy link
Author

Ok, now I understand, thanks for your time. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants