Hi everyone,
Currently there's a problem with repeated vector expressions (`[0,
..n]`): the value must be copyable. I would like to change this to
implicit copyability changing as part of the migration to `Clone`, which
makes this even more restrictive.
This makes it impossible (without writing a very long literal) to have
something reasonable like `[None, ..4096]` with the value as
`Option<~T>`, since `Option<~T>` is not implicitly copyable.
The easiest way that I can see to fix this is to treat `EXPR` in `[EXPR,
..COUNT]` as evaluated once for each `COUNT`. Essentially it becomes a
thunk. This makes me slightly nervous, but I don't see anything wrong
with it semantically.
Thoughts?
Patrick
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev