rustfix

Automatically apply the suggestions made by rustc

7 unstable releases (3 breaking)

0.4.2 Jul 31, 2018
0.4.1 Jul 26, 2018
0.4.0 May 23, 2018
0.3.1 May 22, 2018
0.1.0 May 15, 2017

#2 in Cargo plugins

Download history 6454/week @ 2018-09-18 7167/week @ 2018-09-25 9434/week @ 2018-10-02 12848/week @ 2018-10-09 10312/week @ 2018-10-16 8858/week @ 2018-10-23 9937/week @ 2018-10-30 9041/week @ 2018-11-06 9066/week @ 2018-11-13 9089/week @ 2018-11-20 9264/week @ 2018-11-27 9134/week @ 2018-12-04 9667/week @ 2018-12-11

29,907 downloads per month
Used in 24 crates (2 directly)

Apache-2.0/MIT

24KB
508 lines

rustfix

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

Build Status Build status

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 implement 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 to transition to Rust 2018

Instructions on how to use this tool to transition a crate to Rust 2018 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

~1.5MB
~37K SLoC