On Mon, Jul 29, 2013 at 1:21 PM, Thiez <[email protected]> wrote:
> This would make for some interesting/confusing calling conventions. It would
> also mean &T and &mut T would no longer share a representation; &int would
> simply be int, but &mut int would still have to be a pointer. Borrowing &mut
> T to &T would be a dereference if T is pointer size or smaller? The only
> reliable way of taking an address would be taking &mut because & would fail
> for some types. Transmuting *something to &something or back would fail for
> some types, unless we make transmute smarter.
>
> I think for our sanity it would be best to let LLVM perform this kind of
> magic when it figures out we won't notice the difference.

It will only do this for internal functions and only at --opt-level=3.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to