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

Test failure of unchecked arithmetic intrinsics in const eval #68937

Merged
merged 1 commit into from
Feb 12, 2020

Conversation

ecstatic-morse
Copy link
Contributor

Test that the unchecked arithmetic intrinsics that were made unstably const in #68809 emit an error during const-eval if given invalid input.

Addresses this comment.

r? @RalfJung

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 7, 2020
@RalfJung
Copy link
Member

Any reason you used half a dozen different files as opposed to putting them all into the same file?

@ecstatic-morse
Copy link
Contributor Author

Any reason you used half a dozen different files as opposed to putting them all into the same file?

miri had them in separate files, which I copied over and converted with a macro. I could merge them as long as const-eval evaluates other consts after throw_ub.

@ecstatic-morse ecstatic-morse force-pushed the unchecked-intrinsics-test branch 2 times, most recently from b7f8065 to 8db5d55 Compare February 10, 2020 19:56
@RalfJung
Copy link
Member

Yeah, Miri stops on the first error (not sure what else an interpreter could possibly do).

rustc just gives up for that particular const and tries the next, so we can merge many compile-fail tests in one file.

@RalfJung
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 12, 2020

📌 Commit ee52fe6 has been approved by RalfJung

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 12, 2020
…-test, r=RalfJung

Test failure of unchecked arithmetic intrinsics in const eval

Test that the unchecked arithmetic intrinsics that were made unstably const in rust-lang#68809 emit an error during const-eval if given invalid input.

Addresses [this comment](rust-lang#68809 (comment)).

r? @RalfJung
bors added a commit that referenced this pull request Feb 12, 2020
Rollup of 11 pull requests

Successful merges:

 - #67695 (Added dyn and true keyword docs)
 - #68487 ([experiment] Support linking from a .rlink file)
 - #68554 (Split lang_items to crates `rustc_hir` and `rustc_passes`.)
 - #68937 (Test failure of unchecked arithmetic intrinsics in const eval)
 - #68947 (Python script PEP8 style guide space formatting and minor Python source cleanup)
 - #68999 (remove dependency on itertools)
 - #69026 (Remove common usage pattern from `AllocRef`)
 - #69027 (Add missing `_zeroed` varants to `AllocRef`)
 - #69058 (Preparation for allocator aware `Box`)
 - #69070 (Add self to .mailmap)
 - #69077 (Fix outdated doc comment.)

Failed merges:

r? @ghost
@bors bors merged commit ee52fe6 into rust-lang:master Feb 12, 2020
@ecstatic-morse ecstatic-morse deleted the unchecked-intrinsics-test branch October 6, 2020 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants