This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 688a0c0
committed
Auto merge of rust-lang#128918 - scottmcm:tweak-alignment-mir, r=<try>
Try to shrink `Alignment`-related MIR in `Layout`
Noticed all this in <https://rust.godbolt.org/z/55Tx65v4e>:
```rust
_22 = (_11.0: std::ptr::alignment::AlignmentEnum);
_23 = discriminant(_22);
_24 = Ge(_23, const 1_u64);
_25 = Le(_23, const 9223372036854775808_u64);
_26 = BitAnd(move _24, move _25);
assume(move _26);
_20 = _23 as usize (IntToInt);
```
So let's see if a non-`as` here works better.1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
0 commit comments