]> git.lizzy.rs Git - rust.git/commit
use if let to avoid potential div by zero
authorcjkenn <cam.j.kennedy@gmail.com>
Thu, 17 May 2018 03:02:01 +0000 (20:02 -0700)
committercjkenn <cam.j.kennedy@gmail.com>
Sat, 19 May 2018 15:49:54 +0000 (08:49 -0700)
commitecce274e56e1da80dff66f9d8886c7645f129244
treea1e91c0353f567370588cf5b043def7e2f38d36d
parentdf40e61382a2cba0be621fdabb9971ce3475e9a7
use if let to avoid potential div by zero

remove semicolon -_-

Add rem_bytes to conditional to avoid error when performing mod by 0

Add test file to confirm compilation passes.

Ensure we don't divide or mod by zero in llvm_type. Include test file from issue.
src/librustc_codegen_llvm/abi.rs
src/test/ui/issue-50761.rs [new file with mode: 0644]