diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2020-04-10 10:19:47 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-04-20 09:24:41 -0700 |
| commit | d3c96f03b5f6b4457cbabf4f3e1ec6c1aed23385 (patch) | |
| tree | 3cb4cc1be1ab808110ed3b17374b2a73a5824cc0 /src/librustc_error_codes/error_codes | |
| parent | 8ce3f840ae9b735a66531996c32330f24b877cb0 (diff) | |
| download | rust-d3c96f03b5f6b4457cbabf4f3e1ec6c1aed23385.tar.gz rust-d3c96f03b5f6b4457cbabf4f3e1ec6c1aed23385.zip | |
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.
Diffstat (limited to 'src/librustc_error_codes/error_codes')
0 files changed, 0 insertions, 0 deletions
