Open Fishrock123 opened 3 years ago
Oh, yeah that indeed seems like a bug. Declarative macros can take various input types (literals, statements), and I think we may need to add new rules so they operate on all kinds.
I'm not entirely sure what it should be - we'll have to add tests for these really. Does it have to be tt
? Can be less general? I don't really understand well the types that macros take, even with https://cheats.rs/#macros-attributes. Are all literals also expressions, for example?
The
_status
macros, e.g.format_err_status
, only take literals as the status code argument, and prevent an idiomatic usage: