Auto merge of #12509 - xFrednet:changelog-1-77, r=dswij

Changelog for Clippy 1.77 🏫

Roses are violets,
Red is blue,
Let's create a world,
Perfect for me and you

---

### The cat of this release is: *Luigi*

<img width=500 src="https://github.com/rust-lang/rust-clippy/assets/17087237/ea13d05c-e5ba-4189-9e16-49bf1b43c468" alt="The cats of this Clippy release" />

The cat for the next release can be voted on: [here](https://forms.gle/57gbrNvXtCUmrHYh6)

The cat for the next next release can be nominated in the comments and will be voted in the next changelog PR (Submission deadline is 2024-03-30 23:59CET)

---

changelog: none
This commit is contained in:
bors 2024-03-20 23:43:14 +00:00
commit a16a9ed4c6
5 changed files with 65 additions and 11 deletions

View file

@ -2863,7 +2863,7 @@ declare_clippy_lint! {
///
/// OpenOptions::new().create(true).truncate(true);
/// ```
#[clippy::version = "1.75.0"]
#[clippy::version = "1.77.0"]
pub SUSPICIOUS_OPEN_OPTIONS,
suspicious,
"suspicious combination of options for opening a file"
@ -3817,7 +3817,7 @@ declare_clippy_lint! {
/// ```no_run
/// let _ = std::iter::empty::<Result<i32, ()>>().flatten();
/// ```
#[clippy::version = "1.76.0"]
#[clippy::version = "1.77.0"]
pub RESULT_FILTER_MAP,
complexity,
"filtering `Result` for `Ok` then force-unwrapping, which can be one type-safe operation"
@ -3843,7 +3843,7 @@ declare_clippy_lint! {
/// // example code which does not raise clippy warning
/// vec![Some(1)].into_iter().flatten();
/// ```
#[clippy::version = "1.76.0"]
#[clippy::version = "1.77.0"]
pub ITER_FILTER_IS_SOME,
pedantic,
"filtering an iterator over `Option`s for `Some` can be achieved with `flatten`"
@ -3869,7 +3869,7 @@ declare_clippy_lint! {
/// // example code which does not raise clippy warning
/// vec![Ok::<i32, String>(1)].into_iter().flatten();
/// ```
#[clippy::version = "1.76.0"]
#[clippy::version = "1.77.0"]
pub ITER_FILTER_IS_OK,
pedantic,
"filtering an iterator over `Result`s for `Ok` can be achieved with `flatten`"
@ -3896,7 +3896,7 @@ declare_clippy_lint! {
/// option.is_some_and(|a| a > 10);
/// result.is_ok_and(|a| a > 10);
/// ```
#[clippy::version = "1.76.0"]
#[clippy::version = "1.77.0"]
pub MANUAL_IS_VARIANT_AND,
pedantic,
"using `.map(f).unwrap_or_default()`, which is more succinctly expressed as `is_some_and(f)` or `is_ok_and(f)`"
@ -3926,7 +3926,7 @@ declare_clippy_lint! {
/// `"\r\n"`), for example during the parsing of a specific file format in which precisely one newline type is
/// valid.
/// ```
#[clippy::version = "1.76.0"]
#[clippy::version = "1.77.0"]
pub STR_SPLIT_AT_NEWLINE,
pedantic,
"splitting a trimmed string at hard-coded newlines"

View file

@ -37,7 +37,7 @@ declare_clippy_lint! {
/// static BUF: String = const { String::new() };
/// }
/// ```
#[clippy::version = "1.76.0"]
#[clippy::version = "1.77.0"]
pub THREAD_LOCAL_INITIALIZER_CAN_BE_MADE_CONST,
perf,
"suggest using `const` in `thread_local!` macro"

View file

@ -514,7 +514,7 @@ declare_clippy_lint! {
/// ^^^^ ^^ `bool::then` only executes the closure if the condition is true!
/// }
/// ```
#[clippy::version = "1.76.0"]
#[clippy::version = "1.77.0"]
pub EAGER_TRANSMUTE,
correctness,
"eager evaluation of `transmute`"

View file

@ -42,7 +42,7 @@ declare_clippy_lint! {
/// Use instead:
///
/// In such cases, either use `#[derive(PartialEq)]` or don't implement it.
#[clippy::version = "1.76.0"]
#[clippy::version = "1.77.0"]
pub UNCONDITIONAL_RECURSION,
suspicious,
"detect unconditional recursion in some traits implementation"