News for hackers. Stuff that matters.
Re:Rust: A Critical Retrospective by inferiorhuman on Thursday May 19, 2022 @04:10PM (#31439564)
Procedural macros have a peek function from the syn crate. macro_rules macros can stuff this into the pattern matching.

e.g.

https://turreta.com/2019/12/24/pattern-matching-declarative-...

Re:Rust: A Critical Retrospective by colejohnson66 on Friday May 20, 2022 @06:02PM (#31453070)
But proc macros are limited by requiring another crate (unless things have changed in the last year). Sure, it’s just one extra crate in the project, but why must I be forced to?
Re:Rust: A Critical Retrospective by inferiorhuman on Saturday May 21, 2022 @04:23AM (#31456217)
Asked and answered in an adjacent comment.