about summary refs log tree commit diff
path: root/tests/incremental/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-22 04:49:00 +0000
committerbors <bors@rust-lang.org>2023-11-22 04:49:00 +0000
commita8b0e5ffad44922973f47c71ed34bc643b68e62c (patch)
tree17b434bba9be867d01973ed04e83222b8917228d /tests/incremental/thinlto
parent4d563666b1e36ced2e588a92ab26288ad7daf48e (diff)
parenta74fa97faba208993073b0d5faf2092063109560 (diff)
downloadrust-a8b0e5ffad44922973f47c71ed34bc643b68e62c.tar.gz
rust-a8b0e5ffad44922973f47c71ed34bc643b68e62c.zip
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
Diffstat (limited to 'tests/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions