Currently in the parser when parsing 1 as a const argument we special case it to an anon const instead of a directly represented arg. This was because we didn't have support for literals outside of anon consts. We now have some very basic support for this in order for struct expressions to work with literals as field initialisers.
Once #152139 and #152001 have landed I expect our support for directly represented literals to be "good enough" that we can just rip out this special case and always represent literals as hir::ConstArgKind::Literal under mGCA.
Currently in the parser when parsing
1as a const argument we special case it to an anon const instead of a directly represented arg. This was because we didn't have support for literals outside of anon consts. We now have some very basic support for this in order for struct expressions to work with literals as field initialisers.Once #152139 and #152001 have landed I expect our support for directly represented literals to be "good enough" that we can just rip out this special case and always represent literals as
hir::ConstArgKind::Literalunder mGCA.