diff options
| author | bors <bors@rust-lang.org> | 2024-06-26 14:22:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-06-26 14:22:31 +0000 |
| commit | d7c59370cea68cd17006ec3440a43254fd0eda7d (patch) | |
| tree | c2cffb44abcc4ce7edb6a14acc3bb540d9ec8a3f /compiler/rustc_lint | |
| parent | 4bdf8d2d5877f20b54c1506a607ad8c4744cc387 (diff) | |
| parent | dd545e148c0c1680be1555efcb02ece0a16ee3ef (diff) | |
| download | rust-d7c59370cea68cd17006ec3440a43254fd0eda7d.tar.gz rust-d7c59370cea68cd17006ec3440a43254fd0eda7d.zip | |
Auto merge of #126844 - scottmcm:more-ptr-cast-gvn, r=saethlin
Remove more `PtrToPtr` casts in GVN This addresses two things I noticed in MIR: 1. `NonNull::<T>::eq` does `(a as *mut T) == (b as *mut T)`, but it could just compare the `*const T`s, so this removes `PtrToPtr` casts that are on both sides of a pointer comparison, so long as they're not fat-to-thin casts. 2. `NonNull::<T>::addr` does `transmute::<_, usize>(p as *const ())`, but so long as `T: Thin` that cast doesn't do anything, and thus we can directly transmute the `*const T` instead. r? mir-opt
Diffstat (limited to 'compiler/rustc_lint')
0 files changed, 0 insertions, 0 deletions
