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`
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
syntax/ast_util: add `is_by_value_unop()`
Tell typeck that user unops are by value
Tell trans that user unops are by value
Tell expr_use_visitor that user unops are by value
Tell regionck that user unops are by value
libcore: convert unop traits to by value
libstd: convert `BitFlags` unops to by value
libstd: convert `Duration` unops to by value
Fix run pass tests
Test unop move semantics
Address Niko's comments
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`.
remove TreeMap, TreeSet, TrieMap, TrieSet, LruCache. deprecate EnumSet's std re-export
s/Tree/BTree
enumset fallout
auto merge of #19955 : Gankro/rust/kill-all-code, r=aturon

EnumSet lives on in libcollections so that librustc can still use it. This adds a direct dependency on libcollections to librustc and libserialize.

Should not be merged until https://github.com/rust-lang/rfcs/pull/509 is accepted.

All of these collections have already been moved to collect-rs where they will ideally be maintained and experimented with, or will be replaced by something better: https://github.com/Gankro/collect-rs/

[breaking-change]

r? @aturon @alexcrichton
auto merge of #19899 : japaric/rust/unops-by-value, r=nikomatsakis

- The following operator traits now take their argument by value: `Neg`, `Not`. This breaks all existing implementations of these traits.

- The unary operation `OP a` now "desugars" to `OpTrait::op_method(a)` and consumes its argument.

[breaking-change]

---

r? @nikomatsakis This PR is very similar to the binops-by-value PR
cc @aturon