librustc: Allow linkage attribute on any statics, not just foreign statics.
librustc: Respect no-compiler-rt target option for static libs as well.
Add `Show` and `Clone` trait to arrays

Due to not being able to parametrize over array sizes, `Clone` is only
implemented for element types that are `Copy`able.
Fixed several typos in libcollections
Fixed a few typos in libcore
Disallow parsing of struct variants with 0 fields

Make struct variant syntax more consistent with struct syntax and fix an
assert in middle::typeck.

Fix #19003
doc: extend a893397 to make whole document consistent
slightly better deprecation message for fn syntax
change return type of slice_shift_char

`slice_shift_char` splits a `str` into it's leading `char` and the remainder
of the `str`. Currently, it returns a `(Option<char>, &str)` such that:

    "bar".slice_shift_char() => (Some('b'), "ar")
    "ar".slice_shift_char()  => (Some('a'), "r")
    "r".slice_shift_char()   => (Some('r'), "")
    "".slice_shift_char()    => (None,      "")

This is a little odd. Either a `str` can be split into both a head and a
tail or it cannot. So the return type should be `Option<(char, &str)>`.
With the current behaviour, in the case of the empty string, the `str`
returned is meaningless - it is always the empty string.

This commit changes slice_shift_char so that:

    "bar".slice_shift_char() => Some(('b', "ar"))
    "ar".slice_shift_char()  => Some(('a', "r"))
    "r".slice_shift_char()   => Some(('r', ""))
    "".slice_shift_char()    => None

[breaking-change]
libgraphviz: Id::new returns Result<Id, ()> instead of panicking on error

creating a new Id object requires the format to match a subset of `ID` format defined by the DOT language. When the format did not match, the function called assert. This was not mentioned in the docs or the spec. I made the failure explicit by returning an Result<Id, ()>.
Bring back the dylib kind of the link attribute
Don't inherit stability to items in a function body.

Items defined in the body of a function has no visibility
outside it, and thus have no reason to be marked with
stability attributes.

Closes #17488
Remove duplicate code by using util::copy()
Return proper errors with update_err
libcore: add borrow module

Following [the collections reform
RFC](https://github.com/rust-lang/rfcs/pull/235),
this commit adds a new `borrow` module to libcore.

The module contains traits for borrowing data (`BorrowFrom` and
`BorrowFromMut`),
generalized cloning (`ToOwned`), and a clone-on-write smartpointer (`Cow`).
libcollections: use BorrowFrom in TreeSet, Map

This commit generalizes methods like `get` and `remove` for `TreeMap`
and `TreeSet` to use the new `std::borrow` infrastructure.

[breaking-change]
libstd: Deprecate _equiv methods

This commit deprecates the `_equiv` family of methods on `HashMap` and
`HashSet` by instead generalizing the "normal" methods like `get` and
`remove` to use the new `std::borrow` infrastructure.

[breaking-change]
Fallout from deprecation

This commit handles the fallout from deprecating `_with` and `_equiv` methods.
libcollections: generalize BTree* to use BorrowFrom

Generalizes the BTree-based collections to use the new BorrowFrom
infrastructure for more flexible lookups and removals.
Further DSTify Index traits