# Ideas around anonymous enum types

**URL:** <https://internals.rust-lang.org/t/ideas-around-anonymous-enum-types/12627>\
**Category:** language design\
**Created:** [June 25, 2020, 5:36pm UTC](https://internals.rust-lang.org/t/ideas-around-anonymous-enum-types/12627 "2020-06-25T17:36:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![newpavlov](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/newpavlov/32/3290_2.png) [@newpavlov](https://internals.rust-lang.org/u/newpavlov)\
**Post date:** [June 25, 2020, 6:06pm UTC](https://internals.rust-lang.org/t/ideas-around-anonymous-enum-types/12627/3 "2020-06-25T18:06:31Z")

</div>

> [@Ixrec](#):
>
> The usual stumbling block for anonymous enum proposals is that nobody can seem to come up with a good syntax for matching on the variants

One option is to built on top of generalized type ascription to solve it:

> [@Pre-RFC: type-level sets](https://internals.rust-lang.org/t/pre-rfc-type-level-sets/9285):
>
> This proposal is a continuation of [sum-enums Pre-RFC](https://internals.rust-lang.org/t/pre-rfc-sum-enums/8782), which in turn is an alternative to (postponed) [RFC 2587](https://github.com/rust-lang/rfcs/pull/2587). About terminology You can consider “type-level sets” (TLS) a temporary name. (I know it’s an unfortunate abbreviation, but let’s continue with it for now) Alternative names are: type sets (probably will be too confusing considering “typeset”?) true unions sum-enums auto-enum [amalgamated sum](https://en.wikipedia.org/wiki/Pushout_(category_theory)) (anonymous) conflating enums normalized variant fibered sum Summary Introduce a new syntax A…

---

_[View the full topic](https://internals.rust-lang.org/t/ideas-around-anonymous-enum-types/12627)._
