mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-11 11:58:34 +00:00
Update cheatsheets
This commit is contained in:
33
cargo-fix
Normal file
33
cargo-fix
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# cargo fix
|
||||
|
||||
> Automatically fix lint warnings reported by `rustc`.
|
||||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-fix.html>.
|
||||
|
||||
- Fix code even if it already has compiler errors:
|
||||
|
||||
`cargo fix --broken-code`
|
||||
|
||||
- Fix code even if the working directory has changes:
|
||||
|
||||
`cargo fix --allow-dirty`
|
||||
|
||||
- Migrate a package to the next Rust edition:
|
||||
|
||||
`cargo fix --edition`
|
||||
|
||||
- Fix the package’s library:
|
||||
|
||||
`cargo fix --lib`
|
||||
|
||||
- Fix the specified integration test:
|
||||
|
||||
`cargo fix --test {{name}}`
|
||||
|
||||
- Fix all members in the workspace:
|
||||
|
||||
`cargo fix --workspace`
|
||||
Reference in New Issue
Block a user