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

Document that extern crate test is still required for benchmarks with 2018 edition #121

Closed
dekellum opened this issue Nov 28, 2018 · 2 comments

Comments

@dekellum
Copy link

Originally reported in rust-lang/rust#55133, and of late it seems I'm not the only one surprised by the continued need to use extern crate test in each benchmark as a special case (and with edition="2018")

Currently the guide's Path clarity section doesn't seem to indicate there are any exceptions:

https://rust-lang-nursery.github.io/edition-guide/rust-2018/module-system/path-clarity.html

Here's a brief summary:

  • extern crate is no longer needed

Wouldn't it be helpful to add this or other exceptional cases as a footnote or under the More details: No more extern crate section, with some rationale as indicated in rust-lang/rust#55133? My attempt at a user-centric elaboration:

#![feature(test)] is unstable and doesn't by itself import the test pseudo-crate for benchmarks.

Cc @Mark-Simulacrum (not sure if you also disagree with documenting this discrepancy)

@steveklabnik
Copy link
Member

steveklabnik commented Nov 28, 2018

this isn't specific to test, it's for any of the crates in the sysroot, like proc_macro

and we should document this

@dekellum
Copy link
Author

That sounds like a much better explanation, thanks.

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