macros: always emit return statement by taiki-e · Pull Request #4636 · tokio-rs/tokio (original) (raw)
Fixes #4635
There are two approaches, each divided into commits to compare.
The first commit is the let () =
approach mentioned in #4635 (comment), which fixes #4635 while maintaining the current diagnostics. However, the diagnostics for #4635's case are not very good.
The second commit is a greatly simplified version of the current approach. There is small diagnostics regression, but it improves somewhat for #4635's case.
I tend to prefer the second one, but if other reviewers prefer the first one, I can revert the second commit.