mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 17:48:11 +00:00
This came up because `const T` needs destructor support... This change makes `impl T as Destroy` and `impl const T as Destroy` distinct type structures. Right now there's no impl lookup fallback (see [#6068](https://github.com/carbon-language/carbon-lang/issues/6068)); so when trying to destroy `const T`, there's no way to have an `impl` for it to find. In discussion, `MaybeUnformed` and `partial` have similar challenges, so I'm covering them together. In type_structure.h, I'm switching to an enum because it felt like an easier way to be adding more types. I can switch back if preferred, though then might take a closer look at the `operator==` because that's kind of verbose.