]> git.lizzy.rs Git - rust.git/commit
auto merge of #6754 : thestinger/rust/noalias, r=nikomatsakis
authorbors <bors@rust-lang.org>
Tue, 28 May 2013 09:59:03 +0000 (02:59 -0700)
committerbors <bors@rust-lang.org>
Tue, 28 May 2013 09:59:03 +0000 (02:59 -0700)
commitb738b5766eefc3e600613b8d62b70f89285e6899
tree96b7fb0cbce4656c81a930bb3821870f4c454c7b
parent7ee329e97a24d259f76c1a6e910f32aa11e07862
parentc302010ef0016b6e7d1d869afe489c6ff3735b7e
auto merge of #6754 : thestinger/rust/noalias, r=nikomatsakis

The compiler guarantees that there are no other references to a unique pointer when it's passed by-value to a function.

The existence of the header and annihilator don't matter since it's not relevant to the call:

> For a call to the parent function, dependencies between memory references from before or after the call and from those during the call are “irrelevant” to the noalias keyword for the arguments and return value used in that call.

@graydon's tracing garbage collector stores the metadata outside of the boxes, so that won't be a problem. I'm unsure if updating the header while inside a function where it's marked as `noalias` would be a problem anyway since you never actually read or write to the header.

@nikomatsakis: r?
src/librustc/middle/trans/base.rs