Fix pretty printing of enums without variants by tmiasko · Pull Request #94093 ·...
source link: https://github.com/rust-lang/rust/pull/94093
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
92d20c4 removed no-variants special case from try_destructure_const
with expectation that this case would be handled gracefully when read_discriminant
returns an error.
Alas in that case read_discriminant
succeeds while returning a non-existing variant, so the special case is still necessary.
Fixes #94073.
r? @oli-obk
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK