On 28 Mar 2014, at 14:47, Daniel Micay <danielmi...@gmail.com> wrote:
> On 28/03/14 07:44 AM, Tommi wrote: >> >> This is incorrect. All those range based functions (or majority of >> them... I'm not sure) are safe if the range(s) you pass to them is safe. >> That's why those range functions can't guarantee safety as part of their >> signature. For example, look at the following D code, where I'm using >> range based functions on a range that's memory safe in a code labeled as >> safe: > > So if you make a range, store it and then resize a container, it remains > safe? That will most likely be a bug in your code, but yes, that will be memory safe given that all the functions involved in this are safe (or they can be @trusted given they don't break their promise of being memory safe). Obviously all of this assumes that you haven't disabled the garbage collector (in which case all bets would be off). _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev