1 unstable release

0.1.0 Aug 26, 2024

#2861 in Procedural macros

Download history 75/week @ 2025-10-28 2653/week @ 2025-11-04 2955/week @ 2025-11-11 3846/week @ 2025-11-18 3040/week @ 2025-11-25 7005/week @ 2025-12-02 8016/week @ 2025-12-09 5515/week @ 2025-12-16 1908/week @ 2025-12-23 2052/week @ 2025-12-30 3355/week @ 2026-01-06 2818/week @ 2026-01-13 3630/week @ 2026-01-20 3188/week @ 2026-01-27 3394/week @ 2026-02-03 4128/week @ 2026-02-10

14,709 downloads per month
Used in 15 crates (via jrsonnet-macros)

MIT license

14KB
397 lines

syn-dissect-closure

Having a closure input in proc macro, you may want to know, which of the inner locals are captured from the environment.

Most of this code was taken from serde-closure crate proc-macro, updated to newer syn, and then made into a library to perform other tasks.

TODO

Rename self in closure: Capturing self results in self reference in generated closure and pattern with the same name, it should be renamed to _self in closure, and then captured as-is.

Dependencies

~140–540KB
~13K SLoC