Skip to content

rustc_trans: don't Assert(Overflow(Neg)) when overflow checks are off. - #35300

Merged
bors merged 1 commit into
rust-lang:masterfrom
eddyb:mir-neg-overflow
Aug 4, 2016
Merged

rustc_trans: don't Assert(Overflow(Neg)) when overflow checks are off.#35300
bors merged 1 commit into
rust-lang:masterfrom
eddyb:mir-neg-overflow

Conversation

@eddyb

@eddybeddyb commented Aug 4, 2016

Copy link
Copy Markdown
Contributor

Generic functions using Neg on primitive types would panic even in release mode, with MIR trans.
The solution is a bit hacky, as I'm checking the message, since there's no dedicated CheckedUnOp.

Blocks Servo rustup (failure #1, failure #2) - this should be the last hurdle, it affects only one test.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
eddybforce-pushed the mir-neg-overflow branch 2 times, most recently from a47ff4c to cfa911aCompareAugust 4, 2016 16:57
@arielb1

Copy link
Copy Markdown
Contributor

@bors r+

This is a terribly hacky patch to a terribly hacky system, but to fix it we need to modify MIR for generic crates.

@bors

bors commented Aug 4, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit fbabe61 has been approved by arielb1

@eddyb

eddyb commented Aug 4, 2016

Copy link
Copy Markdown
ContributorAuthor

@bors p=1 (for Servo)

@bors

bors commented Aug 4, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit fbabe61 with merge 545a3a9...

bors added a commit that referenced this pull request Aug 4, 2016
rustc_trans: don't Assert(Overflow(Neg)) when overflow checks are off.
Generic functions using `Neg` on primitive types would panic even in release mode, with MIR trans.
The solution is a bit hacky, as I'm checking the message, since there's no dedicated `CheckedUnOp`.
Blocks Servo rustup ([failure #1](http://build.servo.org/builders/linux-rel/builds/2477/steps/test_3/logs/stdio), [failure #2](http://build.servo.org/builders/mac-rel-css/builds/2364/steps/test/logs/stdio)) - this should be the last hurdle, it affects only one test.
@borsbors mentioned this pull request Aug 4, 2016
@bors
bors merged commit fbabe61 into rust-lang:masterAug 4, 2016
@eddyb
eddyb deleted the mir-neg-overflow branch August 4, 2016 21:55
Sign up for freeto 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.

4 participants

@eddyb@rust-highfive@arielb1@bors