Spurious "checked add" errors from false
constants, since nightly-2023-03-04
.
#1024
Labels
t: bug
Something isn't working
false
constants, since nightly-2023-03-04
.
#1024
In this most recent nightly update:
nightly-2023-03-04
#1005We were hit by the fact that e.g.
<u32 as Add>::add
now invokeschecked_binop(Add)
(i.e. the codegen backend equivalent ofu32::overflowing_add
), ignoring thebool
"did it overflow?" flag only in the MIRAssert
for overflow checks.The fix seemed to work, but it's fundamentally flawed because of using
Add
(orSub
orMul
) and the constantfalse
anywhere in the same crate (well, codegen unit to be more precise, so this is a bit tricky to trigger), will cause theOpConstantFalse
instruction used by both to be annotated with thechecked add is not supported yet
.cc @Shfty (who ran into this in their project, that also triggered #1021, after switching to Rust-GPU
main
)The text was updated successfully, but these errors were encountered: