Removed some unnecessary RefCells from resolve
Fixes ICE when using reexported unit-like structs

Fixes that unit-like structs cannot be used if they are reexported and
used in another crate. The compiler fails with an ICE, because unit-like
structs are exported as DefFn and the expression `UnitStruct` is
interpreted as function pointer instead of a call to the constructor.

To resolve this ambiguity tuple-like struct constructors are now exported
as CtorFn. When `rustc::metadata::decoder` finds a CtorFn it sets a new
flag `is_ctor` in DefFn to true.

Relevant changes are in `rustc::metadata::{encoder, decoder}` and in
`rustc::middle::ty`.

Closes #12660 and #16973.
librustc: Forbid `..` in range patterns.

This breaks code that looks like:

    match foo {
        1..3 => { ... }
    }

Instead, write:

    match foo {
        1...3 => { ... }
    }

Closes #17295.

[breaking-change]
Turn on cfg format warnings
Fix cfg warnings for liblibc
Fix liballoc
Fix libstd
Fix librustrt
Fix libtime
Fix librustc_back
Fix librustc
Fix librustc_llvm
Fix libgreen
Fix libnative
Fix librustuv
Fix rustdoc
librustc: Fix up mutability in method autoderefs if incorrect, and
prefer `Deref` over `DerefMut` in all other circumstances.

Closes #12825.
libstd: Pass-through PATH in test_override_env

In some build environments (such as chrooted Nix builds), `env` can only
be found in the explicitly-provided PATH, not in default places such as
/bin or /usr/bin. So we need to pass-through PATH when spawning the
`env` sub-process.

Fixes #17617
Bound Any with 'static

This bound is already implicit through the AnyPrivate trait,
but since it is not explicit, you still have to write Box<Any + 'static>,
even though Any can only be 'static.

Introducing the 'static bound here makes this bound explicit, making
Box<Any> legal.
auto merge of #17584 : pcwalton/rust/range-patterns-dotdotdot, r=nick29581

This breaks code that looks like:

    match foo {
        1..3 => { ... }
    }

Instead, write:

    match foo {
        1...3 => { ... }
    }

Closes #17295.

r? @nick29581