Convert a first batch of diagnostics to have error codes
add UnicodeStrSlice width() function
add Graphemes iterator; tidy unicode exports

- Graphemes and GraphemeIndices structs implement iterators over
  grapheme clusters analogous to the Chars and CharOffsets for chars in
  a string. Iterator and DoubleEndedIterator are available for both.

- tidied up the exports for libunicode. crate root exports are now moved
  into more appropriate module locations:
  - UnicodeStrSlice, Words, Graphemes, GraphemeIndices are in str module
  - UnicodeChar exported from char instead of crate root
  - canonical_combining_class is exported from str rather than crate root

Since libunicode's exports have changed, programs that previously relied
on the old export locations will need to change their `use` statements
to reflect the new ones. See above for more information on where the new
exports live.

closes #7043
[breaking-change]
Add low level support for polling with librustuv.

 * Adds functions for using arbitrary sockets with libuv
 * Adds types and functions required to support this.
auto merge of #15604 : mrmonday/rust/raw-socket-libc, r=alexcrichton

This pull request adds some necessary function definitions and types for doing low level networking with Rust.
Deprecate `str::from_utf8_owned`

Use `String::from_utf8` instead

[breaking-change]
Deprecate `str::from_chars`

Use `String::from_chars` instead

[breaking-change]
Deprecate `str::from_char`

Use `String::from_char` or `.to_str` instead

[breaking-change]
Deprecate str::from_byte

Replaced by `String::from_byte`

[breaking-change]
Deprecate `str::from_utf16`

Use `String::from_utf16` instead

[breaking-change]
Deprecate `str::from_utf16_lossy`

Use `String::from_utf16_lossy` instead.

[breaking-change]
Deprecate `str::from_utf8_lossy`

Use `String::from_utf8_lossy` instead

[breaking-change]
Fix errors
auto merge of #15426 : aochagavia/rust/str, r=alexcrichton

* Deprecated `str::from_utf8_owned` in favor of `String::from_utf8`
* Deprecated `str::from_utf8_lossy` in favor of `String::from_utf8_lossy`
* Deprecated `str::from_utf16` in favor of `String::from_utf16`
* Deprecated `str::from_utf16_lossy` in favor of `String::from_utf16_lossy`
* Deprecated `str::from_chars` in favor of `String::from_chars`
* Deprecated `str::from_char` in favor of `String::from_char` and `.to_string()`
* Deprecated `str::from_byte` in favor of `String::from_byte`

[breaking-change]
test: Try to fix a failing snapshot test

This test seems to yield a different error message on cross compiles, so just
ignore it when cross compiling.
auto merge of #15615 : jakub-/rust/diagnostics, r=brson
auto merge of #15619 : kwantam/rust/master, r=huonw

- `width()` computes the displayed width of a string, ignoring the width of control characters.
    - arguably we might do *something* else for control characters, but the question is, what?
    - users who want to do something else can iterate over chars()

- `graphemes()` returns a `Graphemes` struct, which implements an iterator over the grapheme clusters of a &str.
    - fully compliant with [UAX#29](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)
    - passes all [Unicode-supplied tests](http://www.unicode.org/reports/tr41/tr41-15.html#Tests29)

- added code to generate additionial categories in `unicode.py`
    - `Cn` aka `Not_Assigned`
    - categories necessary for grapheme cluster breaking

- tidied up the exports from libunicode
  - all exports are exposed through a module rather than directly at crate root.
  - std::prelude imports UnicodeChar and UnicodeStrSlice from std::char and std::str rather than directly from libunicode

closes #7043
libsyntax::ast: Derive Show impls
middle: Derive Show impls

And change some uses of the `{:?}` format string to `{}`.
typeck::check::_match: Better error handling

Previously this was an Option::unwrap() which failed for me.
Unfortunately I've since inadvertently worked around the bug and have
been unable to reproduce it. With this patch hopefully the next person
to encounter this will be in a slightly better position to debug it.