What is this?
This is a meta issue for tracking manual testing of "upgrading" crates to Rust 2018 preview. We're hoping to kick the tires for a lot of crates. There's a list below, but feel free to test your own additions and leave comments.
How to test a crate
The steps are described here in the transition guide, but here is a cheat sheet:
- Update nightly:
- Install rustfix if you haven't already:
cargo install cargo-fix --git https://github.com/rust-lang-nursery/rustfix
- Clone the crate in question
- Verify that it builds (if not, that's some other problem we better fix first):
- Edit
src/lib.rs and add #![feature(rust_2018_preview)]
- Verify that it still builds:
- Create a commit, perhaps on a new branch (recommended name:
rust-2018-migration):
git commit -a -m 'add rust_2018_preview feature'
- Run rustfix:
cargo +nightly fix --prepare-for 2018
- Verify that it still builds:
- Create another commit on that same branch:
git commit -a -m 'run rustfix
- Update to the new edition by adding the following to
Cargo.toml:
cargo-features = ["edition"]
package.edition = "2018"
- Verify that it still builds:
- Create another commit on that same branch:
git commit -a -m 'upgraded to new edition
If all of this works, great! Leave a comment below, including a link to the commit or branch with the changes.
If you encounter an error due to the migration, leave a comment below with a link to the commit and the error!
Crate listing
What is this?
This is a meta issue for tracking manual testing of "upgrading" crates to Rust 2018 preview. We're hoping to kick the tires for a lot of crates. There's a list below, but feel free to test your own additions and leave comments.
How to test a crate
The steps are described here in the transition guide, but here is a cheat sheet:
rustup update nightlycargo install cargo-fix --git https://github.com/rust-lang-nursery/rustfixcargo +nightly buildsrc/lib.rsand add#![feature(rust_2018_preview)]cargo +nightly buildrust-2018-migration):git commit -a -m 'add rust_2018_preview feature'cargo +nightly fix --prepare-for 2018cargo +nightly buildgit commit -a -m 'run rustfixCargo.toml:cargo-features = ["edition"]package.edition = "2018"cargo +nightly buildgit commit -a -m 'upgraded to new editionIf all of this works, great! Leave a comment below, including a link to the commit or branch with the changes.
If you encounter an error due to the migration, leave a comment below with a link to the commit and the error!
Crate listing
#[cfg(test)]code fails, filed some kind of #[cfg] story for rustfix #51208fasterfails to migrate #51211