Reddit makes an anti-user change. In other news, grass is green.
I haven’t been on the site in over a year and nothing since then has convinced me to go back. Maybe I’m lucky that I’m not in any Reddit-only communities, but it could also just be that I treat those communities as though they don’t exist and never had a reason to join one as a result.
Correct - Rust’s attribute grammar allows any parseable sequence of tokens enclosed in
#[attr ...]
basically. Serde specifically requires things to be in strings, but this is not a requirement of modern Rust or modern versions ofsyn
(if you’re comfortable writing your own parser for the meta).The author is not a Rust expert though, so I’m not surprised to see this assumption. It doesn’t take away from the article though.
Edit: for fun,
syn
has an example parsing an attribute in an attribute