Add test for #18908
Special-case transmute for primitive, SIMD & pointer types.

This detects (a subset of) the cases when `transmute::<T, U>(x)` can be
lowered to a direct `bitcast T x to U` in LLVM. This assists with
efficiently handling a SIMD vector as multiple different types,
e.g. swapping bytes/words/double words around inside some larger vector
type.

C compilers like GCC and Clang handle integer vector types as `__m128i`
for all widths, and implicitly insert bitcasts as required. This patch
allows Rust to express this, even if it takes a bit of `unsafe`, whereas
previously it was impossible to do at all without inline assembly.

Example:

    pub fn reverse_u32s(u: u64x2) -> u64x2 {
        unsafe {
            let tmp = mem::transmute::<_, u32x4>(u);
            let swapped = u32x4(tmp.3, tmp.2, tmp.1, tmp.0);
            mem::transmute::<_, u64x2>(swapped)
        }
    }

Compiling with `--opt-level=3` gives:

Before

    define <2 x i64> @_ZN12reverse_u32s20hbdb206aba18a03d8tbaE(<2 x i64>) unnamed_addr #0 {
    entry-block:
      %1 = bitcast <2 x i64> %0 to i128
      %u.0.extract.trunc = trunc i128 %1 to i32
      %u.4.extract.shift = lshr i128 %1, 32
      %u.4.extract.trunc = trunc i128 %u.4.extract.shift to i32
      %u.8.extract.shift = lshr i128 %1, 64
      %u.8.extract.trunc = trunc i128 %u.8.extract.shift to i32
      %u.12.extract.shift = lshr i128 %1, 96
      %u.12.extract.trunc = trunc i128 %u.12.extract.shift to i32
      %2 = insertelement <4 x i32> undef, i32 %u.12.extract.trunc, i64 0
      %3 = insertelement <4 x i32> %2, i32 %u.8.extract.trunc, i64 1
      %4 = insertelement <4 x i32> %3, i32 %u.4.extract.trunc, i64 2
      %5 = insertelement <4 x i32> %4, i32 %u.0.extract.trunc, i64 3
      %6 = bitcast <4 x i32> %5 to <2 x i64>
      ret <2 x i64> %6
    }

    _ZN12reverse_u32s20hbdb206aba18a03d8tbaE:
    	.cfi_startproc
    	movd	%xmm0, %rax
    	punpckhqdq	%xmm0, %xmm0
    	movd	%xmm0, %rcx
    	movq	%rcx, %rdx
    	shrq	$32, %rdx
    	movq	%rax, %rsi
    	shrq	$32, %rsi
    	movd	%eax, %xmm0
    	movd	%ecx, %xmm1
    	punpckldq	%xmm0, %xmm1
    	movd	%esi, %xmm2
    	movd	%edx, %xmm0
    	punpckldq	%xmm2, %xmm0
    	punpckldq	%xmm1, %xmm0
    	retq

After

    define <2 x i64> @_ZN12reverse_u32s20hbdb206aba18a03d8tbaE(<2 x i64>) unnamed_addr #0 {
    entry-block:
      %1 = bitcast <2 x i64> %0 to <4 x i32>
      %2 = shufflevector <4 x i32> %1, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
      %3 = bitcast <4 x i32> %2 to <2 x i64>
      ret <2 x i64> %3
    }

    _ZN12reverse_u32s20hbdb206aba18a03d8tbaE:
    	.cfi_startproc
    	pshufd	$27, %xmm0, %xmm0
    	retq
Rename assert_eq arguments to left and right.

The names expected and actual are not used anymore in the output. It also
removes the confusion that the argument order is the opposite of junit.
Change 'Example' to 'Examples' throughout collections' rustdocs.
Clean up `libcollections::VecMap`

- Introduce a named type for the return type of `VecMap::move_iter`
- Rename all type parameters to `V` for "Value".
- Remove unnecessary call to an `Option::unwrap`, use pattern matching instead.
- Remove incorrect `Hash` implementation which took the `VecMap`'s capacity
  into account.

This is a [breaking-change], however whoever used the `Hash` implementation
relied on an incorrect implementation.
Rollback accidental documentation changes

These probably happened during the merge of the commit that made `Copy` opt-in.

Also, convert the last occurence of `/**` to `///` in `src/libstd/num/strconv.rs`
Add a proper `Hash` implementation for `VecMap`

Also re-add the previously deleted test with an additional test that would have
failed before, when the hash function depended on the capacity.
doc: grammar fix
typeck: Make the supplied parameters to be a tuple

When a type error occurs, check_method_argument_types() tries to provide
arguments filled with ty::mk_err(). However, if a function takes the
parameters as a tuple, the arguments should be converted to a tuple
before being passed to check_argument_types().

Fixes #19521.
Add doctests for `iter_mut` and `into_iter` of BTreeMap.

Add spacing as dictated by standard rust code style.
auto merge of #19638 : barosl/rust/typeck-tupled-arguments-ice, r=jakub

When a type error occurs, `check_method_argument_types()` tries to provide arguments filled with `ty::mk_err()`. However, if a function takes the parameters as a tuple, the arguments should be converted to a tuple before passing it to `check_argument_types()`.

Fixes #19521.
Remove references to traits that no longer exist

This specifically means:
- `Deque`
- `Map`
- `Set`
auto merge of #19655 : jbranchaud/rust/change-example-to-examples, r=steveklabnik

@steveklabnik I got a start on this.
Update sample code to use `getopts::usage` in `print_usage`
Fix an ICE when trying to resolve a struct variant

Unlike a tuple variant constructor which can be called as a function, a
struct variant constructor is not a function, so cannot be called.

If the user tries to assign the constructor to a variable, an ICE
occurs, because there is no way to use it later. So we should stop the
constructor from being used like that.

A similar mechanism already exists for a normal struct, as it prohibits
a struct from being resolved. This commit does the same for a struct
variant.

This commit also includes some changes to the existing tests.

Fixes #19452.
auto merge of #19663 : tbu-/rust/pr_fix_vecmap, r=Gankro

- Introduce a named type for the return type of `VecMap::move_iter`
- Rename all type parameters to `V` for "Value".
- Remove unnecessary call to an `Option::unwrap`, use pattern matching instead.
- Remove incorrect `Hash` implementation which took the `VecMap`'s capacity
  into account.

This is a [breaking-change], however whoever used the `Hash` implementation
relied on an incorrect implementation.
rustc: Fix `make install`

Move a few docblocks from 'ignore' to something that's not rust (e.g. 'text').

Closes #19678
Don't try to dist src/README.md which does not exist
Fix po4a conf file

This line was declared twice, which causes the build of i10n docs to
fail.
Fix inappropriate ## headings

Fixes #15499.