Files
rust/compiler/rustc_codegen_ssa
bors ae45457594 Auto merge of #160160 - ChayimFriedman2:if-empty-opt, r=TaKO8Ki
Optimize handling of solver errors



- Check for the empty case in `collect_remaining_errors()`.
- Instead of representing trait errors as `Vec<Error>`, use a special type

   This has multiple advantages:

    - Performance. The new type is 1/3 the size of `Vec` (being equivalent in layout to `Option<ThinVec>`) and can be kept in a register.
    - Type safety. We mark the type `#[must_use]`, and thinks requiring errors take `ThinVec`, which requires unwrapping the type and verifying there is indeed an error. We still provide conversions to slices, `ThinVec`, and iteration, because some code needs this and I saw no benefit in changing it, but we deliberately do not provide `Deref<Target = [E]>` or things like that.
2026-08-07 06:00:49 +00:00
..
…

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.