rust/compiler/rustc_trait_selection/src
bors f8d8ffa2eb Auto merge of #111029 - Nilstrieb:when-the-errs-are-too-big, r=petrochenkov
Shrink `SelectionError` a lot

`SelectionError` used to be 80 bytes (on 64 bit). That's quite big. Especially because the selection cache contained `Result<_, SelectionError>. The Ok type is only 32 bytes, so the 80 bytes significantly inflate the size of the cache.

Most variants of the `SelectionError` seem to be hard errors, only `Unimplemented` shows up in practice (for cranelift-codegen, it occupies 23.4% of all cache entries). We can just box away the biggest variant, `OutputTypeParameterMismatch`, to get the size down to 16 bytes, well within the size of the Ok type inside the cache.
2023-05-11 08:43:38 +00:00
..
solve Consolidate the 'match assumption' type methods in GoalKind 2023-05-09 20:37:50 +00:00
traits Auto merge of #111029 - Nilstrieb:when-the-errs-are-too-big, r=petrochenkov 2023-05-11 08:43:38 +00:00
errors.rs IAT: Introduce AliasKind::Inherent 2023-05-04 16:59:10 +02:00
infer.rs Auto merge of #110806 - WaffleLapkin:unmkI, r=lcnr 2023-05-04 05:54:09 +00:00
lib.rs Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00