diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2025-07-05 08:26:32 +0200 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-07-05 10:55:35 +0200 |
| commit | 226b0fbe11812c71c8002b10a40063571cf52b3f (patch) | |
| tree | 20deaf0bfa759fbeeb59a7ea782790d84af63b80 /compiler/rustc_codegen_llvm/src | |
| parent | 733b47ea4b1b86216f14ef56e49440c33933f230 (diff) | |
| download | rust-226b0fbe11812c71c8002b10a40063571cf52b3f.tar.gz rust-226b0fbe11812c71c8002b10a40063571cf52b3f.zip | |
use `is_multiple_of` instead of manual modulo
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/abi.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs index 4b07c8aef91..009e7e2487b 100644 --- a/compiler/rustc_codegen_llvm/src/abi.rs +++ b/compiler/rustc_codegen_llvm/src/abi.rs @@ -146,7 +146,7 @@ impl LlvmType for CastTarget { "total size {:?} cannot be divided into units of zero size", self.rest.total ); - if self.rest.total.bytes() % self.rest.unit.size.bytes() != 0 { + if !self.rest.total.bytes().is_multiple_of(self.rest.unit.size.bytes()) { assert_eq!(self.rest.unit.kind, RegKind::Integer, "only int regs can be split"); } self.rest.total.bytes().div_ceil(self.rest.unit.size.bytes()) |
