Skip to content

Changelog for Clippy 1.76 🐈 #12224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 56 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,65 @@ document.

## Unreleased / Beta / In Rust Nightly

[09ac14c9...master](https://github.com/rust-lang/rust-clippy/compare/09ac14c9...master)
[a859e5cc...master](https://github.com/rust-lang/rust-clippy/compare/a859e5cc...master)

## Rust 1.76

Current stable, released 2023-02-08

[View all 85 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2023-11-02T20%3A23%3A40Z..2023-12-16T13%3A11%3A08Z+base%3Amaster)

### New Lints

- [`infinite_loop`]
[#11829](https://github.com/rust-lang/rust-clippy/pull/11829)
- [`ineffective_open_options`]
[#11902](https://github.com/rust-lang/rust-clippy/pull/11902)
- [`uninhabited_references`]
[#11878](https://github.com/rust-lang/rust-clippy/pull/11878)
- [`repeat_vec_with_capacity`]
[#11597](https://github.com/rust-lang/rust-clippy/pull/11597)
- [`test_attr_in_doctest`]
[#11872](https://github.com/rust-lang/rust-clippy/pull/11872)
- [`option_map_or_err_ok`]
[#11864](https://github.com/rust-lang/rust-clippy/pull/11864)
- [`join_absolute_paths`]
[#11453](https://github.com/rust-lang/rust-clippy/pull/11453)
- [`impl_hash_borrow_with_str_and_bytes`]
[#11781](https://github.com/rust-lang/rust-clippy/pull/11781)
- [`iter_over_hash_type`]
[#11791](https://github.com/rust-lang/rust-clippy/pull/11791)

### Moves and Deprecations

- Renamed `blocks_in_if_conditions` to [`blocks_in_conditions`]
[#11853](https://github.com/rust-lang/rust-clippy/pull/11853)
- Moved [`implied_bounds_in_impls`] to `complexity` (Now warn-by-default)
[#11867](https://github.com/rust-lang/rust-clippy/pull/11867)
- Moved [`if_same_then_else`] to `style` (Now warn-by-default)
[#11809](https://github.com/rust-lang/rust-clippy/pull/11809)

### Enhancements

- [`missing_safety_doc`], [`unnecessary_safety_doc`], [`missing_panics_doc`], [`missing_errors_doc`]:
Added the [`check-private-items`] configuration to enable lints on private items
[#11842](https://github.com/rust-lang/rust-clippy/pull/11842)

### ICE Fixes

- [`impl_trait_in_params`]: No longer crashes when a function has generics but no function parameters
[#11804](https://github.com/rust-lang/rust-clippy/pull/11804)
- [`unused_enumerate_index`]: No longer crashes on empty tuples
[#11756](https://github.com/rust-lang/rust-clippy/pull/11756)

### Others

- Clippy now respects the `CARGO` environment value
[#11944](https://github.com/rust-lang/rust-clippy/pull/11944)

## Rust 1.75

Current stable, released 2023-12-28
Released 2023-12-28

[View all 69 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2023-09-25T11%3A47%3A47Z..2023-11-02T16%3A41%3A59Z+base%3Amaster)

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/doc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ declare_clippy_lint! {
/// unimplemented!();
/// }
/// ```
#[clippy::version = "1.40.0"]
#[clippy::version = "1.76.0"]
pub TEST_ATTR_IN_DOCTEST,
suspicious,
"presence of `#[test]` in code examples"
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/iter_over_hash_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ declare_clippy_lint! {
/// let value = &my_map[key];
/// }
/// ```
#[clippy::version = "1.75.0"]
#[clippy::version = "1.76.0"]
pub ITER_OVER_HASH_TYPE,
restriction,
"iterating over unordered hash-based types (`HashMap` and `HashSet`)"
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/loops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ declare_clippy_lint! {
/// }
/// }
/// ```
#[clippy::version = "1.75.0"]
#[clippy::version = "1.76.0"]
pub INFINITE_LOOP,
restriction,
"possibly unintended infinite loop"
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/repeat_vec_with_capacity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ declare_clippy_lint! {
/// // ^^^ this closure executes 123 times
/// // and the vecs will have the expected capacity
/// ```
#[clippy::version = "1.74.0"]
#[clippy::version = "1.76.0"]
pub REPEAT_VEC_WITH_CAPACITY,
suspicious,
"repeating a `Vec::with_capacity` expression which does not retain capacity"
Expand Down