diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-04-22 10:34:03 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-22 10:34:03 +0900 |
| commit | 24fb393207967d3f3b2802a0dbdd3efafab4e595 (patch) | |
| tree | 65a9e90822f9957eb7dce831121923d5be2c9dac /src/rustllvm/PassWrapper.cpp | |
| parent | 45d050cde277b22a755847338f2acc2c7b834141 (diff) | |
| parent | e53625706106e0227656ddd2fa4d7df54ae2b90e (diff) | |
| download | rust-24fb393207967d3f3b2802a0dbdd3efafab4e595.tar.gz rust-24fb393207967d3f3b2802a0dbdd3efafab4e595.zip | |
Rollup merge of #70998 - estebank:suggest-impl-trait-empty-fn, r=varkor
Suggest `-> impl Trait` and `-> Box<dyn Trait>` on fn that doesn't return During development, a function could have a return type set that is a bare trait object by accident. We already suggest using either a boxed trait object or `impl Trait` if the return paths will allow it. We now do so too when there are *no* return paths or they all resolve to `!`. We still don't handle cases where the trait object is *not* the entirety of the return type gracefully. Closes #38376.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
