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
Rewrite method resolution to be cleaner, more correct, and to lay
groundwork for better performance.

Key points:

- Separate out determining which method to use from actually selecting
  a method (this should enable caching, as well as the pcwalton fast-reject strategy).
- Merge the impl selection back into method resolution and don't rely on
  trait matching (this should perform better but also is needed to resolve some
  kind of conflicts, see e.g. `method-two-traits-distinguished-via-where-clause.rs`)
- Purge a lot of out-of-date junk and coercions from method lookups.
Substitute type/lifetimeInstatiate method type/early-bound lifetime parameters too when creating xform-self-type.

Fixes #18208.
Correct long line
Correct indentation
Port a simplified versions of pcwalton's "quick reject" mechanism for quickly throwing out method candidates. Yields a 40%-50% improvement in typechecking time as well as lowering peak memory use from 2.2GB to 1.8GB (due to creating fewer types).

Conflicts:
	src/librustc/driver/config.rs
	src/librustc/middle/ty.rs
	src/librustc/middle/typeck/check/method.rs
	src/librustc/middle/typeck/check/mod.rs
	src/librustc/middle/typeck/coherence/mod.rs
Use the quick reject mechanism during trait matching as well. Seems to
yield an incremental improvement (type-checking rustc drops from ~9s
to ~8s).