mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 20:12:41 +00:00
Teach CARBON_KIND_SWITCH to handle mutable lvalues and rvalues, and CARBON_KIND to forward along rvalues so that it's possible to write `case CARBON_KIND(const T& t)`, `case CARBON_KIND(T& t)`, and `case CARBON_KIND(T&& t)`, depending on the type that was passed to CARBON_KIND_SWITCH. Replace all uses of VariantMatch with their equivalent of a switch using CARBON_KIND_SWITCH, and remove the VariantMatch helper from the codebase.