syn
syn copied to clipboard
Parser for Rust source code
See #1652. I have not found these impls valuable in practice. They are originally from #144.
https://docs.rs/syn/2/syn/visit/index.html https://docs.rs/syn/2/syn/visit_mut/index.html https://docs.rs/syn/2/syn/fold/index.html These account for a surprisingly large proportion of the compile time of the syn crate, on the order of 31% when "parsing", "printing", and "full" features are...
Tracking issue: https://github.com/rust-lang/rust/issues/67792 ```rust const CREATE: T = T::create(); ```
Tracking issue: https://github.com/rust-lang/rust/issues/118898 ```rust for await item in iter { } ```
Tracking issue: https://github.com/rust-lang/rust/issues/121618 ```rust Some(2).match { Some(_) => true, None => false } ```
Tracking issue: https://github.com/rust-lang/rust/issues/123076 ```rust let mut ref x = (); let mut ref mut x = (); ```
Tracking issue: https://github.com/rust-lang/rust/issues/62290 ```rust async fn call(f: &impl async Fn() -> T) -> T { ```
`first()`, `last()`, `iter()` also do not produce Pair. We make you explicitly ask for Pair by writing `pairs()` or `pairs().next()` or `pairs().next_back()`, since wanting the whole Pair is uncommon. `pop()`...
I'm trying to build a `Fold` visitor that removes all `Attribute`s that match a pattern, using `Fold::fold_attribute` doesn't work because I want to replace the attribute with nothing, not another...
#1550