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

miri-unleash tests: ensure they fire even with 'allow(const_err)' #71318

Merged
merged 2 commits into from
Apr 24, 2020

Conversation

RalfJung
Copy link
Member

This is easier with static than const so I switched some of them over.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

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

r? @oli-obk @ecstatic-morse

READ_INTERIOR_MUT;
//~^ ERROR: erroneous constant used
READ_MUT;
//~^ ERROR: erroneous constant used
Copy link
Member Author

@RalfJung RalfJung Apr 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes the error is "erroneous constant used", other times it is "evaluation of constant expression failed". I am not sure where the inconsistency is coming from. Maybe it is because in the latter case, promotion was involved?

@oli-obk
Copy link
Contributor

oli-obk commented Apr 22, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Apr 22, 2020

📌 Commit 579d09eda91e71bd75d923e8795a13c41443ad8e has been approved by oli-obk

@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 Apr 22, 2020
// Test that `MUTABLE_BEHIND_RAW` is actually immutable, by doing this at const time.
unsafe {
*MUTABLE_BEHIND_RAW = 99 //~ ERROR any use of this value will cause an error
//~^ NOTE: which is read-only
// FIXME would be good to match more of the error message here, but looks like we
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to normalize the messages that NOTE/WARN/ERROR match against? It did not seem to work here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, these can't be normalized

@bors
Copy link
Contributor

bors commented Apr 23, 2020

☔ The latest upstream changes (presumably #71467) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 23, 2020
@RalfJung RalfJung force-pushed the miri-unleash-cleanup branch from 579d09e to 6b76b0e Compare April 23, 2020 19:25
@RalfJung
Copy link
Member Author

Rebased.
@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Apr 23, 2020

📌 Commit 6b76b0e has been approved by oli-obk

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 23, 2020
@RalfJung RalfJung closed this Apr 23, 2020
@RalfJung RalfJung reopened this Apr 23, 2020
@RalfJung
Copy link
Member Author

GHA PR builders always "cancel" themselves it seems -- Azure builders are fine (Cc @pietroalbini)

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 24, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#71235 (Tweak `'static` suggestion code)
 - rust-lang#71318 (miri-unleash tests: ensure they fire even with 'allow(const_err)')
 - rust-lang#71428 (Let compiletest recognize gdb 10.x)
 - rust-lang#71475 (Miri Frame: use mir::Location to represent position in function)
 - rust-lang#71476 (more compact way to adjust test sizes for Miri)

Failed merges:

r? @ghost
@bors bors merged commit 2846aa2 into rust-lang:master Apr 24, 2020
@RalfJung RalfJung deleted the miri-unleash-cleanup branch April 24, 2020 15:58
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.

5 participants