Skip to content

manually test converting a bunch of crates to rust 2018 preview #51180

Closed
@nikomatsakis

Description

@nikomatsakis

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:
    • rustup 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):
    • cargo +nightly build
  • Edit src/lib.rs and add #![feature(rust_2018_preview)]
  • Verify that it still builds:
    • cargo +nightly build
  • 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:
    • cargo +nightly build
  • 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:
    • cargo +nightly build
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-edition-2018Area: The 2018 editionC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-rust_2018_preview`#![feature(rust_2018_preview)]`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions