Use niche-filling optimization even when multiple variants have data.
Fixes #46213
This commit is contained in:
parent
1a08b96a0b
commit
d7a750b504
13 changed files with 338 additions and 158 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue