about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-14 07:47:32 +0100
committerGitHub <noreply@github.com>2022-01-14 07:47:32 +0100
commit347c744fe0e464737dbbdc44d148c84fc07568cb (patch)
tree14030d488ca3fccf39bff1c20f3d22807c828211 /compiler/rustc_codegen_llvm/src
parentf13e871ac561b54ddeac2b6173b1905fb4b20138 (diff)
parentab7c4464920531559c4da0a9e9b8972ae2443ed1 (diff)
downloadrust-347c744fe0e464737dbbdc44d148c84fc07568cb.tar.gz
rust-347c744fe0e464737dbbdc44d148c84fc07568cb.zip
Rollup merge of #92381 - ThePuzzlemaker:issue-92308, r=estebank
Suggest `return`ing tail expressions in async functions

This PR fixes #92308.

Previously, the suggestion to `return` tail expressions (introduced in #81769) did not apply to `async` functions, as the suggestion checked whether the types were equal disregarding `impl Future<Output = T>` syntax sugar for `async` functions. This PR changes that in order to fix a potential papercut.

I'm not sure if this is the "right" way to do this, so if there is a better way then please let me know.

I amended an existing test introduced in #81769 to add a regression test for this, if you think I should make a separate test I will.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions