Uh oh!
There was an error while loading. Please reload this page.
repr-type specific oflo checks for enum discrim values. - #23841
Conversation
rust-highfive
commented
Mar 29, 2015
(rust_highfive has picked a reviewer for you, use r? to override) |
pnkfelix
commented
Mar 29, 2015
(it would be nice to get this in for the beta release.) |
There was a problem hiding this comment.
Conventionally I believe our error messages start with lowercase letters, and I also think that two clauses are separated by semicolons (minor though)
There was a problem hiding this comment.
Okay, the capitalization and exclamation point were both inherited from the previous checking, but I'm happy to revise.
There was a problem hiding this comment.
Ah it's not super important in that case, we could just tweak the error message later if that's easier.
alexcrichton
commented
Mar 30, 2015
Looks good to me, thanks @pnkfelix! r=me with just a few nits. |
995b0fa to
cb8957eComparepnkfelix
commented
Mar 30, 2015
@bors r=alexcrichton |
bors
commented
Mar 30, 2015
📌 Commit cb8957e has been approved by |
pnkfelix
commented
Mar 30, 2015
@bors r- (Rebase was unfinished) |
pnkfelix
commented
Mar 30, 2015
@bors r=alexcrichton |
bors
commented
Mar 30, 2015
📌 Commit 3800bb0 has been approved by |
bors
commented
Mar 30, 2015
⌛ Testing commit 3800bb0 with merge 2a65f72... |
bors
commented
Mar 30, 2015
💔 Test failed - auto-linux-64-x-android-t |
pnkfelix
commented
Mar 31, 2015
Okay, this reproduces locally (all one needs to do is cross-compile from a 64-bit host to a 32-bit target). |
pnkfelix
commented
Mar 31, 2015
bors
commented
Mar 31, 2015
📌 Commit 3ced9d1 has been approved by |
pnkfelix
commented
Mar 31, 2015
(does not fix #20600. :( more to do clearly.) |
bors
commented
Mar 31, 2015
☔ The latest upstream changes (presumably #23549) made this pull request unmergeable. Please resolve the merge conflicts. |
3ced9d1 to
18e4e30Compare…values. Moved such overflow checking into one place (in `rustc::middle::ty`, since it needs to be run on-demand during `const_eval` in some scenarios), and revised `rustc_typeck` accordingly. (Note that we only check for overflow if program did not provide a discriminant value explicitly.) Fixrust-lang#23030Fixrust-lang#23221Fixrust-lang#23235
…tch to target type.
18e4e30 to
278227eComparepnkfelix
commented
Mar 31, 2015
@bors r=alexcrichton |
bors
commented
Mar 31, 2015
📌 Commit 278227e has been approved by |
pnkfelix
commented
Mar 31, 2015
@bors r- (seems like my rebase was not complete) |
pnkfelix
commented
Apr 1, 2015
closing in favor of #23863 |
const_eval : add overflow-checking for {`+`, `-`, `*`, `/`, `<<`, `>>`}.
One tricky detail here: There is some duplication of labor between `rustc::middle::const_eval` and `rustc_trans::trans::consts`. It might be good to explore ways to try to factor out the common structure to the two passes (by abstracting over the particular value-representation used in the compile-time interpreter).
----
Update: Rebased atop rust-lang#23841Fixrust-lang#22531Fixrust-lang#23030Fixrust-lang#23221Fixrust-lang#23235
repr-type specific oflo checks for enum discrim values.
Moved such overflow checking into one place (in
rustc::middle::ty, since it needs to be run on-demand duringconst_evalin some scenarios), and revisedrustc_typeckaccordingly.Fix#23030
Fix#23221
Fix#23235