diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-06 23:26:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-06 23:26:57 +0100 |
| commit | 99fee7896b9a5e8e21af1ba6787b21566e945d78 (patch) | |
| tree | 7ceebe74dd71b38787ef95abd9a170416dd405d8 /src/test/debuginfo/enum-thinlto.rs | |
| parent | 62528d86b01f6d595759d9974413fd2c9055af30 (diff) | |
| parent | a6883c0ab00042f63c7e4cec3066577f3f8b8e5c (diff) | |
| download | rust-99fee7896b9a5e8e21af1ba6787b21566e945d78.tar.gz rust-99fee7896b9a5e8e21af1ba6787b21566e945d78.zip | |
Rollup merge of #67009 - Aaron1011:fix/coerce-suggestion, r=Centril
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. I'm not happy about disabling the `issue-59756`, but from what I can tell, the suggestion infrastructure in rustc lacks any way of indicating mutually exclusive suggestions (and compiletest lacks a way to only apply a subset of available suggestions).
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
