]> git.proxmox.com Git - rustc.git/blame - vendor/rustfix/Readme.md
New upstream version 1.55.0+dfsg1
[rustc.git] / vendor / rustfix / Readme.md
CommitLineData
83c7162d
XL
1# rustfix
2
94b46f34 3The goal of this tool is to read and apply the suggestions made by rustc.
83c7162d 4
94b46f34 5## Current status
83c7162d 6
94b46f34 7Currently, rustfix is split into two crates:
83c7162d 8
94b46f34
XL
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.
83c7162d 11
136023e0 12The magic of rustfix is entirely dependent on the diagnostics implemented in the Rust compiler (and external lints, like [clippy]).
83c7162d 13
94b46f34 14[clippy]: https://github.com/rust-lang-nursery/rust-clippy
83c7162d
XL
15
16## Installation
17
8faf50e0 18To use the rustfix library, add it to your `Cargo.toml`.
83c7162d 19
94b46f34 20To get the tool to automatically fix warnings in, run `cargo install cargo-fix`. This will give you `cargo fix`.
83c7162d 21
8faf50e0
XL
22## Using `cargo fix` to transition to Rust 2018
23
24Instructions on how to use this tool to transition a crate to Rust 2018 can be
0731742a 25found [in the Rust Edition Guide.](https://rust-lang-nursery.github.io/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html)
8faf50e0 26
83c7162d
XL
27## License
28
29Licensed under either of
30
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>)
33
34at your option.
35
36### Contribution
37
38Unless you explicitly state otherwise, any contribution intentionally
39submitted for inclusion in the work by you, as defined in the Apache-2.0
40license, shall be dual licensed as above, without any additional terms or
41conditions.