Skip to content

Commit 6e798b3

Browse files
committed
Update rustfix readme to be a little more current.
1 parent a4fd77c commit 6e798b3

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

crates/rustfix/Readme.md

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,12 @@
55

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

8-
## Current status
8+
This is a low-level library. You pass it the JSON output from `rustc`, and you can then use it to apply suggestions to in-memory strings. This library doesn't execute commands, or read or write from the filesystem.
99

10-
Currently, rustfix is split into two crates:
10+
If you are looking for the [`cargo fix`] implementation, the core of it is located in [`cargo::ops::fix`].
1111

12-
- `rustfix`, a library for consuming and applying suggestions in the format that `rustc` outputs (this crate)
13-
- `cargo-fix`, a binary that works as cargo subcommand and that end users will use to fix their code (maintained in the [cargo](https://github.com/rust-lang/cargo/blob/master/src/bin/cargo/commands/fix.rs) repo).
14-
15-
16-
The library (and therefore this repo) is considered largely feature-complete. This is because:
17-
* There is no compiler or even rust-specific logic here
18-
* New lints and suggestions come from the Rust compiler (and external lints, like [clippy]).
19-
* `rustfix` doesn't touch the filesystem to implement fixes, or read from disk
20-
21-
[clippy]: https://github.com/rust-lang-nursery/rust-clippy
22-
23-
## Installation
24-
25-
`cargo fix` is a built-in command in Cargo since Rust 1.29. There is no need to install it separately from crates.io.
26-
27-
To use the rustfix library for use in your own fix project, add it to your `Cargo.toml`.
28-
29-
## Using `cargo fix --edition` to transition to Rust 2021
30-
31-
Instructions on how to use this tool to transition a crate to Rust 2021 can be
32-
found [in the Rust Edition Guide.](https://rust-lang-nursery.github.io/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html)
12+
[`cargo fix`]: https://doc.rust-lang.org/cargo/commands/cargo-fix.html
13+
[`cargo::ops::fix`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/fix.rs
3314

3415
## License
3516

0 commit comments

Comments
 (0)