rust-lang/rust — pull request #20061 by aturon (2014-12-20 06:05:16+00:00)
Title: Second pass stabilization: slice and vec

# Second pass stabilization: vec

This PR takes a second pass through the `vec` module to
stabilize its API. The changes are as follows:

**Stable**:

* `dedup`
* `from_raw_buf`
* `from_raw_parts`
* `insert`
* `into_iter`
* `is_empty`
* `remove`
* `reserve_exact`
* `reserve`
* `retain`
* `swap_remove`
* `truncate`

**Deprecated**:

* `from_fn`, `from_elem`, `grow_fn` and `grow`, all deprecated in
favor of iterators. See rust-lang/rfcs#509

* `partition`, `partitioned`, deprecated in favor of a new, more
general iterator consumer called `partition`.

* `unzip`, deprecated in favor of a new, more general iterator
consumer called `unzip`.

A few remaining methods are left at experimental status.

# Second pass stabilization: slice

This PR takes a second pass through the `slice` module to
stabilize its API. The changes are as follows:

**Stable**:

* `as_mut_slice`
* `as_ptr`, `as_mut_ptr`
* `back`, `back_mut` (was: `last`)
* `binary_search_by` (was: `binary_search`)
* `binary_search` (was: `binary_search_elem`)
* `chunks`, `chunks_mut`
* `contains`
* `ends_with`
* `front`, `front_mut` (was: `head`)
* `get_unchecked`, `get_unchecked_mut` (was: `unsafe_get`)
* `get`
* `is_empty`
* `iter`, `iter_mut`
* `len`
* `next_permutation`
* `permutations`
* `prev_permutation`
* `reverse`
* `sort_by`
* `sort`
* `split_at`, `split_at_mut`
* `split_mut`, `splitn_mut`, `rsplitn_mut`
* `split`, `splitn`, `rsplitn`
* `starts_with`
* `swap`
* `to_vec`
* `windows`

**Deprecated**:

* `head`, `head_mut`, `last`, `last_mut` (renamed as above)
* `unsafe_get`, `unsafe_mut` (renamed as above)
* `binary_search_elem` (renamed as above)
* `partitioned`, deprecated in favor of a new, more
general iterator consumer called `partition`.
* `BinarySearchResult`, deprecated in favor of `Result`

# Unify concat and concat_vec

We've long had traits `StrVector` and `VectorVector` providing
`concat`/`connect` and `concat_vec`/`connect_vec` respectively. The
reason for the distinction is that coherence rules did not used to be
robust enough to allow impls on e.g. `Vec` versus `Vec<&[T]>`.

This PR consolidates the traits into a single `SliceConcatExt` trait
provided by `slice` and the prelude (where it replaces `StrVector`,
which is removed.)

[breaking-change]

r? @alexcrichton