Previously, if you created a GenericArgument::Const containing an expression that was not legal syntax within a path's const generics, such as:
impl Trait<1 + 1>
^^^^^
then Syn would automatically legalize it in the ToTokens impl to print with braces: impl Trait<{1 + 1}>. But for GenericArgument::AssocConst it was not doing this, although the syntax rules are the same.
Previously, if you created a GenericArgument::Const containing an expression that was not legal syntax within a path's const generics, such as:
then Syn would automatically legalize it in the ToTokens impl to print with braces:
impl Trait<{1 + 1}>
. But for GenericArgument::AssocConst it was not doing this, although the syntax rules are the same.