Skip to content

Commit 61a9311

Browse files
pietroalbinibstrie
andauthored
Update posts/2023-04-20-Rust-1.69.0.md
Co-authored-by: bstrie <865233+bstrie@users.noreply.github.com>
1 parent 6ff9b22 commit 61a9311

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

posts/2023-04-20-Rust-1.69.0.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,19 @@ Rust 1.69.0 introduces no major new features. However, it contains many small im
2525

2626
Rust 1.29.0 added the `cargo fix` subcommand to automatically fix some simple compiler warnings. Since then, the number of warnings that can be fixed automatically continues to steadily increase. In addition, support for automatically fixing some simple Clippy warnings has also been added.
2727

28-
Starting from Rust 1.69.0, Cargo will suggest running `cargo fix` or `cargo clippy --fix` when it detects some warnings are automatically fixable.
28+
In order to draw more attention to these increased capabilities, Cargo will now suggest running `cargo fix` or `cargo clippy --fix` when it detects warnings that are automatically fixable:
29+
30+
warning: unused import: `std::hash::Hash`
31+
--> src/main.rs:1:5
32+
|
33+
1 | use std::hash::Hash;
34+
| ^^^^^^^^^^^^^^^
35+
|
36+
= note: `#[warn(unused_imports)]` on by default
37+
38+
warning: `foo` (bin "foo") generated 1 warning (run `cargo fix --bin "foo"` to apply 1 suggestion)
39+
40+
Note that the full Cargo invocation shown above is only necessary if you want to precisely apply fixes to a single crate. If you want to apply fixes to all the default members of a workspace, then a simple `cargo fix` (with no additional arguments) will suffice.
2941

3042
### Debug information is not included in build scripts by default anymore
3143

0 commit comments

Comments
 (0)