Windows dbghelp strips leading underscores from symbols, so let's accept "ZN...E" form too.
Also, print PC displacement from symbols.
Fix typo
Only try to install the doc directory if it exists.

If you configure with `--disable-docs`, the `doc` directory does not get generated, so
`cp -r doc dist/` fails when you `make dist{,-tar-bins,-doc}` or `make install`
auto merge of #19819 : vadimcn/rust/fix-demangle, r=alexcrichton

Windows dbghelp strips leading underscores from symbols, and I could not find a way to turn this off.  So let's accept  "ZN...E" form too.
Also, print PC displacement from symbols.  This is helpful in gauging whether the PC was indeed within the function displayed in the backtrace, or whether it just happened to be the closest public symbol in the module.
librustc: Always parse `macro!()`/`macro![]` as expressions if not
followed by a semicolon.

This allows code like `vec![1i, 2, 3].len();` to work.

This breaks code that uses macros as statements without putting
semicolons after them, such as:

    fn main() {
        ...
        assert!(a == b)
        assert!(c == d)
        println(...);
    }

It also breaks code that uses macros as items without semicolons:

    local_data_key!(foo)

    fn main() {
        println("hello world")
    }

Add semicolons to fix this code. Those two examples can be fixed as
follows:

    fn main() {
        ...
        assert!(a == b);
        assert!(c == d);
        println(...);
    }

    local_data_key!(foo);

    fn main() {
        println("hello world")
    }

RFC #378.

Closes #18635.

[breaking-change]
auto merge of #19984 : japaric/rust/macro-expressions, r=alexcrichton

followed by a semicolon.

This allows code like `vec![1i, 2, 3].len();` to work.

This breaks code that uses macros as statements without putting
semicolons after them, such as:

    fn main() {
        ...
        assert!(a == b)
        assert!(c == d)
        println(...);
    }

It also breaks code that uses macros as items without semicolons:

    local_data_key!(foo)

    fn main() {
        println("hello world")
    }

Add semicolons to fix this code. Those two examples can be fixed as
follows:

    fn main() {
        ...
        assert!(a == b);
        assert!(c == d);
        println(...);
    }

    local_data_key!(foo);

    fn main() {
        println("hello world")
    }

RFC #378.

Closes #18635.

[breaking-change]

---

Rebased version of #18958
r? @alexcrichton 
cc @pcwalton
auto merge of #19896 : ktossell/rust/allow-nodoc-install, r=alexcrichton

If you configure with `--disable-docs`, the `doc` directory does not get generated, so the
`cp -r doc dist/` step fails when you `make dist{,-tar-bins,-doc}` or `make install`.
Add tests for sub relationship on free/bound regions, revealing a bug.
Fix bug in higher-ranked code that would sometimes leak skolemized regions and/or cause incorrect results.
Cleanup type resolution to use type folding infrastructure and not
have such a silly over-engineered interface.
Delete tests that passed in error. We currently do not support a Clone
impl for fn pointer types including bound regions, unfortunately.
Propagate expected type more widely so that we can rewrite the
issue-14039 test in a more natural way. Previously the "type we will
cast to" was hidden unless it was an integer.
Recycle skolemization counts and add some comments.
Extract skolemize_regions() helper function.
Extract leak check into a distinct subroutine.
Fix a bug in the opt-in-copy work: it was failing to liberate the regions bound in the impl before searching for `Copy` implements for all fields, leading to problems in the "copyability check". Basically the copyability check would wind up looking for an impl of `for<'tcx> Foo<&'tcx T>`. The impl that exists however is `impl<T> Copy for Foo<T>` and the current rules do not consider that a match (something I would like to revise in a later PR).
Create distinct types for a PolyTraitRef (with bindings) and a normal TraitRef.
Rename the code that replaces unbound variables to "freshen" rather than "skolemize" -- strictly speaking, this is not skolemization, because it is not discharging quantifiers. Also, the trait selection code will still be doing true skolemization, so it would be a confusing overlap of names.
Add (currently unused) helper routine for skolemizing bound regions.
Centralize on using `Binder` to introduce new binding levels, rather than having FnSig carry an implicit binding level.  This means that we be more typesafe in general, since things that instantiate bound regions can drop the Binder to reflect that.