-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Transition the code to Rust 2018 #500
Comments
With Rust 2015, you can use #[cfg(test)]
extern crate core; I took my copy of the source, removed the 2018 edition, and added that one snippet (to |
Yeah, but this wouldn't really be an improvement over the current situation ( |
bors bot
added a commit
that referenced
this issue
Nov 19, 2018
501: Update to the 2018 edition of Rust r=phil-opp a=phil-opp This updates the blog to use the upcoming [2018 edition](https://rust-lang-nursery.github.io/edition-guide/rust-2018/index.html) of Rust, which is currently in beta and already the default on nightly. It changes a few local import paths (now with a `crate::` prefix) and removes all `extern crate` definitions and `macro_use` attributes. This PR changes a lot of code across all posts, so there might be some things in the posts that I forgot to update. Please let me know if you see anything! [Preview of the changes](https://rust-2018--blog-os.netlify.com/) Fixes #499 Fixes #500 Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rust 2018 is about to be released and it's already the default for new crates on nightly. So we should update this crate and the blog posts to the 2018 edition of Rust.
After transitioning:
#![cfg_attr(not(test), no_std)]
instead of#[cfg(test)] extern crate std
as proposed here.The text was updated successfully, but these errors were encountered: