7b25e88602
The wording of RFC #495 enables moves out of slices. Unfortuantely, non-zeroing moves out of slices introduce a very annoying complication: as slices can vary in their length, indexes from the start and end may or may not overlap depending on the slice's exact length, which prevents assigning a particular drop flag for each individual element. For example, in the code ```Rust fn foo<T>(a: Box<[Box<[T]>]>, c: bool) -> T { match (a, c) { (box [box [t, ..], ..], true) => t, (box [.., box [.., t]], false) => t, _ => panic!() } } ``` If the condition is false, we have to drop the first element of `a`, unless `a` has size 1 in which case we drop all the elements of it but the last. If someone comes with a nice way of handling it, we can always re-allow moves out of slices. This is a [breaking-change], but it is behind the `slice_patterns` feature gate and was not allowed until recently. |
||
---|---|---|
.. | ||
bootstrap | ||
build_helper | ||
compiler-rt@8598065bd9 | ||
doc | ||
driver | ||
etc | ||
grammar | ||
jemalloc@e058ca6616 | ||
liballoc | ||
liballoc_jemalloc | ||
liballoc_system | ||
libarena | ||
libbacktrace | ||
libcollections | ||
libcollectionstest | ||
libcompiler_builtins | ||
libcore | ||
libcoretest | ||
libflate | ||
libfmt_macros | ||
libgetopts | ||
libgraphviz | ||
liblibc@d4f6a19c55 | ||
liblog | ||
libpanic_abort | ||
libpanic_unwind | ||
libproc_macro | ||
librand | ||
librbml | ||
librustc | ||
librustc_back | ||
librustc_bitflags | ||
librustc_borrowck | ||
librustc_const_eval | ||
librustc_const_math | ||
librustc_data_structures | ||
librustc_driver | ||
librustc_errors | ||
librustc_incremental | ||
librustc_lint | ||
librustc_llvm | ||
librustc_macro | ||
librustc_metadata | ||
librustc_mir | ||
librustc_passes | ||
librustc_platform_intrinsics | ||
librustc_plugin | ||
librustc_privacy | ||
librustc_resolve | ||
librustc_save_analysis | ||
librustc_trans | ||
librustc_typeck | ||
librustc_unicode | ||
librustdoc | ||
libserialize | ||
libstd | ||
libsyntax | ||
libsyntax_ext | ||
libsyntax_pos | ||
libterm | ||
libtest | ||
libunwind | ||
llvm@16b79d01fd | ||
rt | ||
rtstartup | ||
rust-installer@755bc3db4f | ||
rustc | ||
rustllvm | ||
test | ||
tools | ||
stage0.txt |