mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
e7a3cb7ab0
FP: `needless_return_with_question_mark` with implicit Error Conversion Return with a question mark was triggered in situations where the `?` desuraging was performing error conversion via `Into`/`From`. The desugared `?` produces a match over an expression with type `std::ops::ControlFlow<B,C>` with `B:Result<Infallible, E:Error>` and `C:Result<_, E':Error>`, and the arms perform the conversion. The patch adds another check in the lint that checks that `E == E'`. If `E == E'`, then the `?` is indeed unnecessary. changelog: False Positive: [`needless_return_with_question_mark`] when implicit Error Conversion occurs. fixes: #11982 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |