On Thu, Jul 25, 2013 at 9:45 AM, Marvin Löbel <[email protected]> wrote: > I'm all for using `in` in the `for` syntax, and then using the `in` keyword > as part of the allocation interface sounds like a good idea. > But isn't that interface as presentatd a bit limited? At least, if it uses > *mut u8 and is unsafe then `foo() in bar()` would be the same as `*bar() = > foo()`, right? > > Don't we need something like `alloc <expr>` for evaluating an expression > into a new allocation, > and `alloc <expr> in <expr2>` for evaluating an expression into an new > allocation inside of `<expr2>`?
`*bar = foo` with `*mut u8` will actually still run the destructor on `*bar` before moving `foo` into it _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
