mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
a8b0e5ffad
[`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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |