-
Notifications
You must be signed in to change notification settings - Fork 349
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
retag return place #1330
retag return place #1330
Conversation
You want to a raw pointer to some |
Yeah, this creates a temporary: fn foo(_ptr: *mut i32) -> i32 { 4 }
fn main() {
let mut ret = 0i32;
let ptr = &mut ret as *mut _;
ret = foo(ptr);
} |
I'm not entirely sure why we do that, don't we make temporaries for all the non-constant args? |
Miri: expand frame hooks This is needed to make rust-lang/miri#1330 work. r? @oli-obk @eddyb
Miri: expand frame hooks This is needed to make rust-lang/miri#1330 work. r? @oli-obk @eddyb
Miri: expand frame hooks This is needed to make rust-lang/miri#1330 work. r? @oli-obk @eddyb
111ead3
to
3548dcf
Compare
@bors r+ |
📌 Commit 3548dcf has been approved by |
☀️ Test successful - checks-travis, status-appveyor |
@eddyb suggested that return places should be treated like unique references for Stacked Borrows. That is implemented by this patch, but it is unfortunately quite the hack because otherwise we are retagging references, not places.
@eddyb does this roughly correspond to what you had in mind? (Except for whatever it is you think should happen with argument passing, which is a much bigger issue.) Also, do you think there is any way we can test this?
Needs rust-lang/rust#71100 to land.