Find a file
Manish Goregaokar b416b98fab
Update Readme.md
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2023-10-15 19:51:10 -07:00
.github/workflows ci: use new cargo fmt option 2022-01-13 17:14:16 -06:00
examples More updates to anyhow 2020-01-07 13:28:59 -08:00
proptest-regressions Add special case for empty string 2018-05-18 08:41:50 -07:00
src Make Diagnostic::is_primary public 2022-02-16 13:23:44 -08:00
tests replace the tempdir crate with the tempfile one, as tempfile have superseded tempdir 2022-02-13 10:56:06 +01:00
.editorconfig Add Boilerplate 2016-07-07 11:23:58 +02:00
.gitignore Added newline at EOF 2020-10-06 19:07:11 +02:00
.gitmodules No crate tests no more (for now) 2017-12-20 00:45:36 +01:00
Cargo.toml Bump version 2022-05-23 14:01:33 -04:00
Changelog.md Bump version to 0.4.6 and add change log 2019-08-07 07:19:20 -07:00
LICENSE-APACHE Add Apache 2.0 License 2016-07-07 16:45:16 +02:00
LICENSE-MIT Add Apache 2.0 License 2016-07-07 16:45:16 +02:00
Readme.md Update Readme.md 2023-10-15 19:51:10 -07:00

rustfix

Latest Version Rust Documentation

Rustfix is a library defining useful structures that represent fix suggestions from rustc

Current status

Currently, rustfix is split into two crates:

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

The library (and therefore this repo) is considered largely feature-complete. This is because:

  • There is no compiler or even rust-specific logic here
  • New lints and suggestions come from the Rust compiler (and external lints, like clippy).
  • rustfix doesn't touch the filesystem to implement fixes, or read from disk

Installation

cargo fix is a built-in command in Cargo since Rust 1.29. There is no need to install it separately from crates.io.

To use the rustfix library for use in your own fix project, add it to your Cargo.toml.

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.