Tweak region inference to ignore constraints like 'a <= 'static, since they
have no value. This also ensures that we can handle some obscure cases of fn
subtyping with bound regions that we didn't used to handle correctly.

Fixes #13974.
Factor out foldable better to reduce code duplication.  There is now a "double
dispatch" pattern that lets you easily write new folders and then apply them to
various structures, reusing the "folding" effort.
num: rename Cmplx to Complex

Cmplx is a uselessly short name. Change it to be more clear.

[breaking-change]
Remove a workaround for deriving(Clone) on unit structs.
Added functions pop_char and shift_char to StrBuf struct along with appropriate unit tests, using the same test case as push_char.

Changed StrBuf.shift_byte() that it no longer reallocates the buffer by just calling Vec.shift();

Added warning to shift_char()'s docs about it having to copy the whole buffer, as per the docs for
Vec.shift().
auto merge of #14167 : cmr/rust/cmplx, r=alexcrichton

[breaking-change]
auto merge of #14168 : zwarich/rust/deriving-clone, r=alexcrichton
auto merge of #14158 : nikomatsakis/rust/issue-5527-refactor-foldable, r=pcwalton

Factor out foldable better to reduce code duplication. 

r? @pcwalton (probably want to let travis run...)
serialize: Broaden ignores of json tests

It was thought that these failures only happened on windows, turns out they
happen on any 32-bit machine.

cc #14064
auto merge of #14052 : dylanbraithwaite/rust/char-fns-for-strbuf, r=alexcrichton

Added functions pop_char and shift_char to StrBuf along with unit tests, using the same test cases as push_char.
Use CreateProcessW instead of CreateProcessA

Changed libnative to use CreateProcessW instead of CreateProcessA.  In
addition, the lpEnvironment parameter now uses Unicode.

Added a helper function os::win32::as_mut_utf16_p, which does basically
the same thing as os::win32::as_utf16_p except the pointer is mutable.
Fix make_command_line to handle Unicode correctly

Previously, make_command_line iterates over each u8 in the string and
then appends them as chars, so any non-ASCII string will get horribly
mangled by this function.  This fix should allow Unicode arguments to
work correctly in native::io::process::spawn.
Use Get/FreeEnvironmentStringsW instead of Get/FreeEnvironmentStringsA

Changed libstd to use Get/FreeEnvironmentStringsW instead of
Get/FreeEnvironmentStringsA to support Unicode environment variables.
Test Unicode support of process spawning

Added a run-pass test to ensure that processes can be correctly spawned
using non-ASCII arguments, working directory, and environment variables.
It also tests Unicode support of os::env_as_bytes.

An additional assertion was added to the test for make_command_line to
verify it handles Unicode correctly.
auto merge of #14075 : Rufflewind/rust/patch-3, r=alexcrichton

- Use Unicode-aware versions of `CreateProcess` (Fixes #13815) and `Get/FreeEnvironmentStrings`.
    - Includes a helper function `os::win32::as_mut_utf16_p`, which does the same thing as `os::win32::as_utf16_p` except the pointer is mutable.
    - Fixed `make_command_line` to handle Unicode correctly.
- Tests for the above.
Suppress a "unused variable" warning.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Suppress warnings on 32bit platforms.

On 32bit platforms, int is the same as i32, so 0xffffffff is "out of
range." Annotating variables as u32 fixes the problems.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
std: Move the owned module from core to std

The compiler was updated to recognize that implementations for ty_uniq(..) are
allowed if the Box lang item is located in the current crate. This enforces the
idea that libcore cannot allocated, and moves all related trait implementations
from libcore to libstd.

This is a breaking change in that the AnyOwnExt trait has moved from the any
module to the owned module. Any previous users of std::any::AnyOwnExt should now
use std::owned::AnyOwnExt instead. This was done because the trait is intended
for Box traits and only Box traits.

[breaking-change]
Allow blocks in const expressions

Only blocks with tail expressions that are const expressions
and items are allowed.
Add tests for from_bits.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>