about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/alloc_example.rs
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-07-16 17:06:38 +0200
committerGitHub <noreply@github.com>2025-07-16 17:06:38 +0200
commit37aba8388e93c9beeb092cbfa4540555d67a0af9 (patch)
treec0bf69c71c431a85b7a2dd2a712a4342d953dd17 /compiler/rustc_codegen_gcc/example/alloc_example.rs
parent9f2015d3d3884e17044be61926292f7b7a41bdc8 (diff)
parentf1b5a5638ec3aba301dc5a50daccb4c1ed69ac78 (diff)
downloadrust-37aba8388e93c9beeb092cbfa4540555d67a0af9.tar.gz
rust-37aba8388e93c9beeb092cbfa4540555d67a0af9.zip
Rollup merge of #143355 - hkBst:cleanup-shift-double-bitmask, r=Mark-Simulacrum
wrapping shift: remove first bitmask and table

```rust
        #[inline(always)]
        pub const fn wrapping_shl(self, rhs: u32) -> Self {
            // SAFETY: the masking by the bitsize of the type ensures that we do not shift
            // out of bounds
            unsafe {
                self.unchecked_shl(rhs & (Self::BITS - 1))
            }
        }
```
already does the bitmask, so it seems unnecessary here.

More context: internals.rust-lang.org/t/wrapping-shift-operator-code-doing-bitmasking-twice/23167
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/alloc_example.rs')
0 files changed, 0 insertions, 0 deletions