Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builder: use undef bool instead of false, for checked_binop's zombie. #1025

Merged
merged 1 commit into from
Apr 5, 2023
Merged

builder: use undef bool instead of false, for checked_binop's zombie. #1025

merged 1 commit into from
Apr 5, 2023

Conversation

eddyb
Copy link
Contributor

@eddyb eddyb commented Apr 4, 2023

The actual fix was tiny, but testing required going through some hoops, as the original issue only seemed to reproduce with --release (ironically, given the checked overflow connection).

In the end I went with -Ccodegen-units=1 (to try and force the user's bool constants to overlap the zombie), but I'm not 100% sure that's future-proof. But it did reproduce, i.e. w/o the fix, the test errors with:

error: checked add is not supported yet
   --> /home/eddy/.rustup/toolchains/nightly-2023-03-04-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/arith.rs:104:45
    |
104 |             fn add(self, other: $t) -> $t { self + other }
    |                                             ^^^^^^^^^^^^
    |
    = note: Stack:
            issue_1024::main
            main

@eddyb eddyb requested a review from oisyn as a code owner April 4, 2023 00:02
@eddyb eddyb enabled auto-merge (rebase) April 4, 2023 02:26
@eddyb eddyb merged commit 7b7015e into EmbarkStudios:main Apr 5, 2023
@eddyb eddyb deleted the checked-add-zombie-false branch April 5, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spurious "checked add" errors from false constants, since nightly-2023-03-04.
2 participants