3 ms·
This is also my error, and the author has been informed. He just hasn't updated the post yet, but will. I forgot that this got stabilized. It's easy to lose tr
by steveklabnik 2y ago
This is also my error, and the author has been informed. He just hasn't updated the post yet, but will.
I forgot that this got stabilized. It's easy to lose track of everything sometimes!
EDIT: oops forgot to reply to this:
> I'm not sure if it's because Serde started before it was allowed or if it's a stylistic preference or what.
This was stabilized post 1.0, and serde is (as you know) older than Rust 1.0. That's why I thought that it wasn't possible. https://doc.rust-lang.org/1.0.0/reference.html#attributes https://doc.rust-lang.org/1.0.0/reference.html#attributes says
> An identifier followed by the equals sign '=' and a literal, providing a key/value pair
Of course, we didn't even have stable proc macros at that point. I tried to dig into the exact history here for a bit, but didn't manage to find the exact point at which this came to be, it was taking too long.