about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-06-19 19:43:05 -0700
committerGitHub <noreply@github.com>2020-06-19 19:43:05 -0700
commitdb7203d6f82e277ba1cedfd78730b1f6ab0f2ba9 (patch)
tree37a1591cab5bdd8d58ca4f1c99e5c1cccbc51927 /library/std/src/sys/unix/stack_overflow.rs
parentd69d4c39ed76de7513082aaa50358e596adae4dd (diff)
parent6fa7dc65272c63a9e8dc1483d176433f39e18575 (diff)
downloadrust-db7203d6f82e277ba1cedfd78730b1f6ab0f2ba9.tar.gz
rust-db7203d6f82e277ba1cedfd78730b1f6ab0f2ba9.zip
Rollup merge of #73442 - davidtwco:issue-72181-pretty-print-const-val-enum-no-variants, r=oli-obk
pretty/mir: const value enums with no variants

Fixes #72181.

This PR modifies the pretty printer and const eval in the MIR so that `destructure_const` (used in `pretty_print_const_value`) can handle enums with no variants (or types containing enums with no variants).

I'm not convinced that this is the correct approach, folks more familiar with `destructure_const` would be able to say - happy to adjust the PR. Looking through `destructure_const` and the functions that it invokes, it didn't seem like it was written to handle zero-variant-enums - I assume that case is handled earlier in some way so `destructure_const` doesn't need to under normal circumstances. It didn't seem like it would be straightforward to make `destructure_const` handle this case in a first-class-feeling way (e.g. adding a `Variants::None` variant), so this PR makes some minimal changes to avoid ICEs.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions