about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2020-04-11 11:31:54 -0700
committerEsteban Küber <esteban@kuber.com.ar>2020-04-20 11:17:03 -0700
commite53625706106e0227656ddd2fa4d7df54ae2b90e (patch)
treeca5862cc1e9602ebb3e5c20b671293de8732f9f1 /src/test/codegen
parentd3c96f03b5f6b4457cbabf4f3e1ec6c1aed23385 (diff)
downloadrust-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