14 releases

0.6.1 May 23, 2022
0.6.0 Jun 9, 2021
0.5.1 Apr 2, 2020
0.5.0 Jan 7, 2020
0.1.0 May 15, 2017

#34 in Development tools

Download history 24905/week @ 2022-08-02 24936/week @ 2022-08-09 24248/week @ 2022-08-16 23276/week @ 2022-08-23 24895/week @ 2022-08-30 23591/week @ 2022-09-06 28355/week @ 2022-09-13 28880/week @ 2022-09-20 28182/week @ 2022-09-27 31020/week @ 2022-10-04 33464/week @ 2022-10-11 33182/week @ 2022-10-18 32933/week @ 2022-10-25 36491/week @ 2022-11-01 37241/week @ 2022-11-08 32818/week @ 2022-11-15

145,428 downloads per month
Used in 183 crates (5 directly)

Apache-2.0/MIT

24KB
509 lines

rustfix

The goal of this tool is to read and apply the suggestions made by rustc.

Current status

Currently, rustfix is split into two crates:

  • rustfix, a library for consuming and applying suggestions in the format that rustc outputs
  • and cargo-fix, a binary that works as cargo subcommand and that end users will use to fix their code.

The magic of rustfix is entirely dependent on the diagnostics implemented in the Rust compiler (and external lints, like clippy).

Installation

To use the rustfix library, add it to your Cargo.toml.

To get the tool to automatically fix warnings in, run cargo install cargo-fix. This will give you cargo fix.

Using cargo fix --edition to transition to Rust 2021

Instructions on how to use this tool to transition a crate to Rust 2021 can be found in the Rust Edition Guide.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.8–1.5MB
~34K SLoC