diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2020-04-11 11:31:54 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-04-20 11:17:03 -0700 |
| commit | e53625706106e0227656ddd2fa4d7df54ae2b90e (patch) | |
| tree | ca5862cc1e9602ebb3e5c20b671293de8732f9f1 /src/test/codegen | |
| parent | d3c96f03b5f6b4457cbabf4f3e1ec6c1aed23385 (diff) | |
| download | rust-e53625706106e0227656ddd2fa4d7df54ae2b90e.tar.gz rust-e53625706106e0227656ddd2fa4d7df54ae2b90e.zip | |
Ensure tail expression will have a `Ty` for E0746
When the return type is `!Sized` we look for all the returned expressions in the body to fetch their types and provide a reasonable suggestion. The tail expression of the body is normally evaluated after checking whether the return type is `Sized`. Changing the order of the evaluation produces undesirable knock down effects, so we detect the specific case that newcomers are likely to encounter ,returning a single bare trait object, and only in that case we evaluate the tail expression's type so that the suggestion will be accurate.
Diffstat (limited to 'src/test/codegen')
0 files changed, 0 insertions, 0 deletions
