mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-02 05:55:42 +00:00
Since `DefIdForest` contains 0 or 1 elements the large majority of the time, by allocating only in the >1 case we avoid almost all allocations, compared to `Arc<SmallVec<[DefId;1]>>`. This shaves off 0.2% on the benchmark that stresses uninhabitedness checking.
For more information about how rustc works, see the rustc dev guide.