Conversation
…list' into memory-data-revived
| @@ -0,0 +1,13 @@ | |||
| fn inner(x: *mut i32, _y: &i32) { | |||
| // If `x` and `y` alias, retagging is fine with this... but we really | |||
There was a problem hiding this comment.
Shouldn't this simply invalidate y? Without the function call (so if inlined) this would suddenly be fine?
There was a problem hiding this comment.
Shouldn't this simply invalidate y?
Yes. But without the barrier, invalidating y would be okay. Nobody is using y again, after all.
There was a problem hiding this comment.
So why are we disallowing this code? y is unused, even in the main function.
There was a problem hiding this comment.
Because we want to enforce that a reference passed to a function is not invalidated while the function executes, no matter whether it is used or not. This is an operational version of "the reference outlives the function".
This can help optimizations that want to introduce new uses.
|
Oh dang, this breaks the |
|
This works now locally. @oli-obk did I resolve your questions? |
|
Uh... it fails to build on Windows? Looks like a rustc bug? EDIT: Reported as rust-lang/rust#56320 |
|
Probably requires rust-lang/rust#56313 to land |
update miri This should make miri green again :) (Includes rust-lang/miri#553) r? @oli-obk
update miri This should make miri green again :) (Includes rust-lang/miri#553) r? @oli-obk
update miri This should make miri green again :) (Includes rust-lang/miri#553) r? @oli-obk
update miri This should make miri green again :) (Includes rust-lang/miri#553) r? @oli-obk
update miri This should make miri green again :) (Includes rust-lang/miri#553) r? @oli-obk
Waiting for a nightly to happen (seems like we skipped one?)