1
Fork 0

Use niche-filling optimization even when multiple variants have data.

Fixes #46213
This commit is contained in:
Michael Benfield 2022-03-08 19:07:01 +00:00
parent 1a08b96a0b
commit d7a750b504
13 changed files with 338 additions and 158 deletions

View file

@ -117,6 +117,10 @@ pub trait ObligationProcessor {
}
/// The result type used by `process_obligation`.
// `repr(C)` to inhibit the niche filling optimization. Otherwise, the `match` appearing
// in `process_obligations` is significantly slower, which can substantially affect
// benchmarks like `rustc-perf`'s inflate and keccak.
#[repr(C)]
#[derive(Debug)]
pub enum ProcessResult<O, E> {
Unchanged,