-
Notifications
You must be signed in to change notification settings - Fork 13.3k
array-to-raw-elem cast: test that Retag covers entire array #85023
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
Retag(_4); // scope 1 at $DIR/retag.rs:59:13: 59:19 | ||
_3 = &raw mut (*_4); // scope 1 at $DIR/retag.rs:59:13: 59:19 | ||
Retag([raw] _3); // scope 1 at $DIR/retag.rs:59:13: 59:19 | ||
_2 = move _3 as *mut usize (Pointer(ArrayToPointer)); // scope 1 at $DIR/retag.rs:59:13: 59:33 |
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.
This is the key part of the test. I am not sure how to make sure this won't be bless'ed away...
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.
Hm. I wonder if we want something like LLVM's FileCheck for mir-opt tests... cc @rust-lang/wg-mir-opt do we have any standard practice here?
r=me in theory, though I agree this seems error-prone as-is. |
@oli-obk I recall you working on this infrastructure so that mir-opt tests can be blessed; is there any way to make sure that the test actually keeps testing what it is supposed to test though? The retag mir-opt test as it exists currently in master is a lot more fragile that I'd like it to be (and back when I added the test, it was less fragile, back then it did ensure that there'd be |
There is no existing infrastructure, but it would be possible to add. I think the hard part is knowing what we actually want. We could do something simple like requiring that a certain string exists in the mir dump, that could easily be added to compiletest by adding more magic comments like the ones for actually doing a dump. |
📌 Commit 2d2ed21 has been approved by |
☀️ Test successful - checks-actions |
Make sure that we
Retag
before doing theArrayToPointer
cast.