Skip to content
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

Changelog for Clippy 1.78 🪄 #12735

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

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

## Unreleased / Beta / In Rust Nightly

[66c29b97...master](https://github.com/rust-lang/rust-clippy/compare/66c29b97...master)
[93f0a9a9...master](https://github.com/rust-lang/rust-clippy/compare/93f0a9a9...master)

## Rust 1.78

Current stable, released 2024-05-02

[View all 112 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2024-01-26T05%3A46%3A23Z..2024-03-07T16%3A25%3A52Z+base%3Amaster)

### Important Changes

* In a few versions, `cargo-clippy` will now no longer ignore the first argument.
Passing in `clippy` as the first argument like cargo does will continue to work.
However, arguments like `--fix` will soon issue a warning and will no longer be.
`cargo clippy` (without `-`!) is unaffected by this change.
[#9461](https://github.com/rust-lang/rust-clippy/pull/9461)

xFrednet marked this conversation as resolved.
Show resolved Hide resolved
### New Lints

* [`assigning_clones`]
[#12077](https://github.com/rust-lang/rust-clippy/pull/12077)
* [`mixed_attributes_style`]
[#12354](https://github.com/rust-lang/rust-clippy/pull/12354)
* [`empty_docs`]
[#12342](https://github.com/rust-lang/rust-clippy/pull/12342)
* [`unnecessary_get_then_check`]
[#12339](https://github.com/rust-lang/rust-clippy/pull/12339)
* [`multiple_bound_locations`]
[#12259](https://github.com/rust-lang/rust-clippy/pull/12259)
* [`unnecessary_clippy_cfg`]
[#12303](https://github.com/rust-lang/rust-clippy/pull/12303)
* [`deprecated_clippy_cfg_attr`]
[#12292](https://github.com/rust-lang/rust-clippy/pull/12292)
* [`manual_c_str_literals`]
[#11919](https://github.com/rust-lang/rust-clippy/pull/11919)
* [`ref_as_ptr`]
[#12087](https://github.com/rust-lang/rust-clippy/pull/12087)
* [`lint_groups_priority`]
[#11832](https://github.com/rust-lang/rust-clippy/pull/11832)
* [`unnecessary_result_map_or_else`]
[#12169](https://github.com/rust-lang/rust-clippy/pull/12169)
* [`to_string_trait_impl`]
[#12122](https://github.com/rust-lang/rust-clippy/pull/12122)
* [`incompatible_msrv`]
[#12160](https://github.com/rust-lang/rust-clippy/pull/12160)

### Moves and Deprecations

* Moved [`mixed_attributes_style`] to `style` (Remains warn-by-default)
xFrednet marked this conversation as resolved.
Show resolved Hide resolved
[#12572](https://github.com/rust-lang/rust-clippy/pull/12572)

xFrednet marked this conversation as resolved.
Show resolved Hide resolved
### Enhancements

* [`thread_local_initializer_can_be_made_const`]: Now checks the [`msrv`] configuration
[#12405](https://github.com/rust-lang/rust-clippy/pull/12405)
* [`disallowed_macros`]: Code generated by derive macros can no longer allow this lint
[#12267](https://github.com/rust-lang/rust-clippy/pull/12267)
* [`wildcard_imports`]: Add configuration [`allowed-wildcard-imports`] to allow preconfigured wildcards
[#11979](https://github.com/rust-lang/rust-clippy/pull/11979)

### ICE Fixes

* [`ptr_as_ptr`]: No longer ICEs on types from other crates
xFrednet marked this conversation as resolved.
Show resolved Hide resolved
[#12617](https://github.com/rust-lang/rust-clippy/pull/12617)
* [`cast_sign_loss`]: Avoids an infinit loop when casting two changed `.unwrap()` calls
xFrednet marked this conversation as resolved.
Show resolved Hide resolved
[#12508](https://github.com/rust-lang/rust-clippy/pull/12508)

## Rust 1.77

Current stable, released 2024-03-18
Released 2024-03-18

[View all 93 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2023-12-16T18%3A20%3A00Z..2024-01-25T18%3A15%3A56Z+base%3Amaster)

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/assigning_clones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ declare_clippy_lint! {
/// a.clone_from(&b);
/// }
/// ```
#[clippy::version = "1.77.0"]
#[clippy::version = "1.78.0"]
pub ASSIGNING_CLONES,
perf,
"assigning the result of cloning may be inefficient"
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/cargo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ declare_clippy_lint! {
/// pedantic = { level = "warn", priority = -1 }
/// similar_names = "allow"
/// ```
#[clippy::version = "1.76.0"]
#[clippy::version = "1.78.0"]
pub LINT_GROUPS_PRIORITY,
correctness,
"a lint group in `Cargo.toml` at the same priority as a lint"
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/casts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ declare_clippy_lint! {
/// let a_ref = &1;
/// let a_ptr = std::ptr::from_ref(a_ref);
/// ```
#[clippy::version = "1.77.0"]
#[clippy::version = "1.78.0"]
pub REF_AS_PTR,
pedantic,
"using `as` to cast a reference to pointer"
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3993,7 +3993,7 @@ declare_clippy_lint! {
/// let x: Result<u32, ()> = Ok(0);
/// let y = x.unwrap_or_else(|err| handle_error(err));
/// ```
#[clippy::version = "1.77.0"]
#[clippy::version = "1.78.0"]
pub UNNECESSARY_RESULT_MAP_OR_ELSE,
suspicious,
"making no use of the \"map closure\" when calling `.map_or_else(|err| handle_error(err), |n| n)`"
Expand Down Expand Up @@ -4027,7 +4027,7 @@ declare_clippy_lint! {
/// needs_cstr(c"Hello");
/// unsafe { libc::puts(c"World".as_ptr()) }
/// ```
#[clippy::version = "1.76.0"]
#[clippy::version = "1.78.0"]
pub MANUAL_C_STR_LITERALS,
pedantic,
r#"creating a `CStr` through functions when `c""` literals can be used"#
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/multiple_bound_locations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ declare_clippy_lint! {
/// F: Sized + std::fmt::Debug,
/// {}
/// ```
#[clippy::version = "1.77.0"]
#[clippy::version = "1.78.0"]
pub MULTIPLE_BOUND_LOCATIONS,
suspicious,
"defining generic bounds in multiple locations"
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/to_string_trait_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ declare_clippy_lint! {
/// }
/// }
/// ```
#[clippy::version = "1.77.0"]
#[clippy::version = "1.78.0"]
pub TO_STRING_TRAIT_IMPL,
style,
"check for direct implementations of `ToString`"
Expand Down