Why is the same version of `syn` compiled twice?

⚓ rust    📅 2025-05-10    👤 surdeus    👁️ 6      

surdeus

Warning

This post was published 52 days ago. The information described in this article may have changed.

Running cargo build --timings shows that crate syn is compiled twice:

|1. |syn v2.0.89 |24.5s |15.5s (63%) |clone-impls, default, derive, extra-traits, full, parsing, printing, proc-macro, visit, visit-mut|
|2. |syn v2.0.89 |22.3s |15.8s (71%) |clone-impls, default, derive, full, parsing, printing, proc-macro|

I was under the impression that cargo's "feature unification" would unify these two.
Running commands like cargo tree -f "{p} {f}" only shows dependencies to first variant.

1 post - 1 participant

Read full topic

🏷️ rust_feed