-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
READ_INTERIOR_MUT; | ||
//~^ ERROR: erroneous constant used | ||
READ_MUT; | ||
//~^ ERROR: erroneous constant used |
There was a problem hiding this comment.
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?
@bors r+ |
📌 Commit 579d09eda91e71bd75d923e8795a13c41443ad8e has been approved by |
// 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
☔ The latest upstream changes (presumably #71467) made this pull request unmergeable. Please resolve the merge conflicts. |
579d09e
to
6b76b0e
Compare
Rebased. |
📌 Commit 6b76b0e has been approved by |
GHA PR builders always "cancel" themselves it seems -- Azure builders are fine (Cc @pietroalbini) |
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
This is easier with
static
thanconst
so I switched some of them over.