Skip to content

Commit

Permalink
Auto merge of #116281 - Nadrieril:eager-const-eval, r=<try>
Browse files Browse the repository at this point in the history
Cleanup number handling in match exhaustiveness

Doing a little bit of cleanup; handling number constants was somewhat messy. In particular, this:

- evals float consts once instead of repetitively
- reduces `Constructor` from 88 bytes to 56 (`mir::Const` is big!)

The `fast_try_eval_bits` function was mostly constructed from inlining existing code but I don't fully understand it; I don't follow how consts work and are evaluated very well.
  • Loading branch information
bors committed Sep 30, 2023
2 parents 2f89c41 + a579e88 commit 448ff6d
Show file tree
Hide file tree
Showing 3 changed files with 226 additions and 138 deletions.
Loading

0 comments on commit 448ff6d

Please sign in to comment.