diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-10-17 05:36:43 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-17 05:36:43 +0900 |
| commit | 75ef735d4a2e159e083889a22902a40d8265fced (patch) | |
| tree | b6a9052f9bb2b16d9d21b97d6b0eef7d60d80a3e /compiler/rustc_mir/src/transform/coverage/debug.rs | |
| parent | 8c4d8555f3071fd481a37db50c7b647dcf3ed34a (diff) | |
| parent | f897162f3efc841461adce9510bb627cea9bac45 (diff) | |
| download | rust-75ef735d4a2e159e083889a22902a40d8265fced.tar.gz rust-75ef735d4a2e159e083889a22902a40d8265fced.zip | |
Rollup merge of #77855 - davidtwco:pr-77341-follow-up-non-constructable-variants, r=estebank
resolve: further improvements to "try using the enum's variant" diagnostic Follow-up on https://github.com/rust-lang/rust/pull/77341#issuecomment-702738281. This PR improves the diagnostic modified in #77341 to suggest not only those variants which do not have fields, but those with fields (by suggesting with placeholders). In addition, the wording of the tuple-variant-only case is improved slightly. I've not made further changes to the tuple-variant-only case (e.g. to only suggest variants with the correct number of fields) because I don't think I have enough information to do so reliably (e.g. in the case where there is an attempt to construct a tuple variant, I have no information on how many fields were provided; and in the case of pattern matching, I only have a slice of spans and would need to check for things like `..` in those spans, which doesn't seem worth it). r? @estebank
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions
