I completely forgot that unit structs/variants define their own associated consts. I wonder if in patterns the type can be used instead of the associated const though? That might resolve a lot of the headache. It’d mean changing the way the ident is resolved to looking in the type namespace though.
const <block> already works as a pattern I believe? That could be used instead for constants.
Literals would always work in-place as constant expressions.
I completely forgot that unit structs/variants define their own associated consts. I wonder if in patterns the type can be used instead of the associated const though? That might resolve a lot of the headache. It’d mean changing the way the ident is resolved to looking in the type namespace though.
const <block>
already works as a pattern I believe? That could be used instead for constants.Literals would always work in-place as constant expressions.