Skip to content

Commit

Permalink
Merge pull request #287 from ehuss/rustfix
Browse files Browse the repository at this point in the history
Update links and text about rustfix.
  • Loading branch information
ehuss authored Dec 11, 2023
2 parents 5a4e7ba + 0562627 commit bbffb07
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/editions/advanced-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ We're now more idiomatic, and we didn't have to fix our code manually!
[`cargo fix`]: ../../cargo/commands/cargo-fix.html
[`explicit-outlives-requirements`]: ../../rustc/lints/listing/allowed-by-default.html#explicit-outlives-requirements
[`keyword-idents`]: ../../rustc/lints/listing/allowed-by-default.html#keyword-idents
[`rustfix`]: https://github.com/rust-lang/rustfix
[`rustfix`]: https://crates.io/crates/rustfix
[`unused-extern-crates`]: ../../rustc/lints/listing/allowed-by-default.html#unused-extern-crates
[Cargo features]: ../../cargo/reference/features.html
[Cargo package]: ../../cargo/reference/manifest.html#the-package-section
Expand All @@ -206,5 +206,5 @@ We're now more idiomatic, and we didn't have to fix our code manually!
[proc macros]: ../../reference/procedural-macros.html
[Rust Analyzer extension]: https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer
[rustdoc-annotation]: ../../rustdoc/documentation-tests.html#attributes
[rustfix-examples]: https://github.com/rust-lang/rustfix/tree/master/examples
[rustfix-examples]: https://github.com/rust-lang/cargo/tree/master/crates/rustfix/examples
[Visual Studio Code]: https://code.visualstudio.com/
2 changes: 1 addition & 1 deletion src/rust-2021/disjoint-capture-in-closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Disjoint capture was proposed as part of [RFC 2229](https://github.com/rust-lang

As a part of the 2021 edition a migration lint, `rust_2021_incompatible_closure_captures`, has been added in order to aid in automatic migration of Rust 2018 codebases to Rust 2021.

In order to have `rustfix` migrate your code to be Rust 2021 Edition compatible, run:
In order to migrate your code to be Rust 2021 Edition compatible, run:

```sh
cargo fix --edition
Expand Down
4 changes: 2 additions & 2 deletions src/rust-2021/prelude.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ The tracking issue [can be found here](https://github.com/rust-lang/rust/issues/

As a part of the 2021 edition a migration lint, `rust_2021_prelude_collisions`, has been added in order to aid in automatic migration of Rust 2018 codebases to Rust 2021.

In order to have `rustfix` migrate your code to be Rust 2021 Edition compatible, run:
In order to migrate your code to be Rust 2021 Edition compatible, run:

```sh
cargo fix --edition
```

The lint detects cases where functions or methods are called that have the same name as the methods defined in one of the new prelude traits. In some cases, it may rewrite your calls in various ways to ensure that you continue to call the same function you did before.

If you'd like to migrate your code manually or better understand what `rustfix` is doing, below we've outlined the situations where a migration is needed along with a counter example of when it's not needed.
If you'd like to migrate your code manually or better understand what `cargo fix` is doing, below we've outlined the situations where a migration is needed along with a counter example of when it's not needed.

### Migration needed

Expand Down
2 changes: 1 addition & 1 deletion src/rust-2021/reserving-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ committed to any of them yet):

As a part of the 2021 edition a migration lint, `rust_2021_prefixes_incompatible_syntax`, has been added in order to aid in automatic migration of Rust 2018 codebases to Rust 2021.

In order to have `rustfix` migrate your code to be Rust 2021 Edition compatible, run:
In order to migrate your code to be Rust 2021 Edition compatible, run:

```sh
cargo fix --edition
Expand Down

0 comments on commit bbffb07

Please sign in to comment.