3 The goal of this tool is to read and apply the suggestions made by rustc.
7 Currently, rustfix is split into two crates:
9 - `rustfix`, a library for consuming and applying suggestions in the format that `rustc` outputs
10 - and `cargo-fix`, a binary that works as cargo subcommand and that end users will use to fix their code.
12 The magic of rustfix is entirely dependent on the diagnostics implemented in the Rust compiler (and external lints, like [clippy]).
14 [clippy]: https://github.com/rust-lang-nursery/rust-clippy
18 To use the rustfix library, add it to your `Cargo.toml`.
20 To get the tool to automatically fix warnings in, run `cargo install cargo-fix`. This will give you `cargo fix`.
22 ## Using `cargo fix --edition` to transition to Rust 2021
24 Instructions on how to use this tool to transition a crate to Rust 2021 can be
25 found [in the Rust Edition Guide.](https://rust-lang-nursery.github.io/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html)
29 Licensed under either of
31 - Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
32 - MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
38 Unless you explicitly state otherwise, any contribution intentionally
39 submitted for inclusion in the work by you, as defined in the Apache-2.0
40 license, shall be dual licensed as above, without any additional terms or