about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2019-12-03 20:32:50 -0500
committerAaron Hill <aa1ronham@gmail.com>2019-12-03 21:51:16 -0500
commit462f06de07d8a5c071c4d8040dad006198f029c9 (patch)
tree8996c1eb65519a9f8179a21ba7a8cc12ddae7787 /src/test/debuginfo/enum-thinlto.rs
parent7afe6d9d1f48b998cc88fe6f01ba0082788ba4b9 (diff)
downloadrust-462f06de07d8a5c071c4d8040dad006198f029c9.tar.gz
rust-462f06de07d8a5c071c4d8040dad006198f029c9.zip
Emit coercion suggestions in more places
Fixes #66910

We have several different kinds of suggestions we can try to make when
type coercion fails. However, we were previously only emitting these
suggestions from `demand_coerce_diag`. This resulted in the compiler
failing to emit applicable suggestions in several different cases, such
as when the implicit return value of a function had the wrong type.

This commit adds a new `emit_coerce_suggestions` method, which tries to
emit a number of related suggestions. This method is called from both
`demand_coerce_diag` and `CoerceMany::coerce_inner`, which covers a much
wider range of cases than before.

We now suggest using `.await` in more cases where it is applicable,
among other improvements.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions