-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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-unleashed: test that we detect heap allocations #71276
Conversation
@@ -0,0 +1,14 @@ | |||
// compile-flags: -Zunleash-the-miri-inside-of-you | |||
#![feature(const_mut_refs, box_syntax)] |
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.
I was quite surprised that I had to add const_mut_refs
here, given that I unleashed miri. Is that expected?
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.
Yes. That was an explicit choice:
rust/src/librustc_mir/transform/check_consts/validation.rs
Lines 214 to 216 in 339a938
// If an operation is supported in miri (and is not already controlled by a feature gate) it | |
// can be turned on with `-Zunleash-the-miri-inside-of-you`. | |
let is_unleashable = O::IS_SUPPORTED_IN_MIRI && O::feature_gate().is_none(); |
dd6a62c
to
cf3470a
Compare
@bors r+ rollup |
📌 Commit cf3470a has been approved by |
…ic-morse miri-unleashed: test that we detect heap allocations This removes the second-to-last use of `IS_SUPPORTED_IN_MIRI = false`. r? @ecstatic-morse @oli-obk
Rollup of 5 pull requests Successful merges: - rust-lang#71271 (Move `MapInPlace` to rustc_data_structures) - rust-lang#71276 (miri-unleashed: test that we detect heap allocations) - rust-lang#71283 (Minor improvements to -Zprofile) - rust-lang#71287 (Explain why we shouldn't add inline attr to into_vec) - rust-lang#71303 (remove build warnings) Failed merges: r? @ghost
This removes the second-to-last use of
IS_SUPPORTED_IN_MIRI = false
.r? @ecstatic-morse @oli-obk