rust/clippy_lints
bors a8b0e5ffad Auto merge of #11627 - y21:issue11616, r=giraffate
[`needless_return_with_question_mark`]: don't lint if never type is used for coercion

Fixes #11616

When we have something like
```rs
let _x: String = {
  return Err(())?;
};
```
we shouldn't suggest removing the `return` because the `!`-ness of `return` is used to coerce the enclosing block to some other type. That will lead to a typeck error without a diverging expression like `return`.

changelog: [`needless_return_with_question_mark`]: don't lint if `return`s never typed-ness is used for coercion
2023-11-22 04:49:00 +00:00
..
src Auto merge of #11627 - y21:issue11616, r=giraffate 2023-11-22 04:49:00 +00:00
Cargo.toml Bump Clippy version -> 0.1.76 2023-11-16 19:02:33 +01:00
README.md

This crate contains Clippy lints. For the main crate, check GitHub.