about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-02-03 01:25:45 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-02-07 13:44:00 +0100
commitcc8f35f874c81be1a5950d2527902b7dd5a94513 (patch)
tree21d2582ef0f4dd357968b0b156fd18c318fdc9b9 /src/libstd/sys/unix/stack_overflow.rs
parentc0a874472a863058ac39654626bf62c2d953b27b (diff)
downloadrust-cc8f35f874c81be1a5950d2527902b7dd5a94513.tar.gz
rust-cc8f35f874c81be1a5950d2527902b7dd5a94513.zip
Restrictions on moves out-from and into fixed-length arrays.
No longer legal: `fn foo(a: [D; 5]) { drop(a); a[2] = D::new(); }`;
one must first initialize the entirety of `a` before assigning to its
individual elements.

No longer legal: `fn foo(arr: [D; 5]) -> D { arr[2] }`, unless `D`
implements `Copy`. This "move out-from" restriction only affects
`expr[i]`, and not destructuring (e.g. `f([a, b, c]: Array) { ... }`).

uses mem_categorization to distinguish destructuring-bind from array
indexing.

See discussion on RFC PR 533.

[breaking-change]
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions