Make BufferedReader propagate 0-byte long reads.

Could prevent callers from catching the situation and lead to e.g early
iterator terminations (cf. `Reader::read_byte') since `None' is only to
be returned only on EOF.
Add tests for 0-byte read propagation.

The two `Some(0)' used to be `None' before the patch, a zero-byte long
read exhausting a reader (and thereafter) still produce a `None'.
rustdoc: Add the ability to test code in comments

This adds support for the `--test` flag to rustdoc which will parse a crate,
extract all code examples in doc comments, and then run each test in the
extra::test driver.
std: Fix all code examples
extra: Fix all code examples
mk: Run doc tests as part of 'make check'

Don't run doc tests during make check-fast because it involves spawning lots of
processes.
doc: Expand rustdoc's documentation for testing
Fixing more doc tests
auto merge of #11120 : alexcrichton/rust/rustdoc-test, r=brson

This commit adds a `--test` flag to rustdoc to expose the ability to test code examples in doc strings. This work by using sundown's `lang` attribute to figure out how a code block should be tested. The format for this is:

```
1. ```rust
2. ```rust,ignore
3. ```rust,notest
4. ```rust,should_fail
```

Where `rust` means that rustdoc will attempt to test is, `ignore` means that it will not execute the test but it will compile it, `notest` means that rustdoc completely ignores it, and `should_fail` means that the test should fail. This commit also leverages `extra::test` for the testing harness in order to allow parallelization and whatnot.

I have fixed all existing code examples in libstd and libextra, but I have not made a pass through the crates in order to change code blocks to testable code blocks.

It may also be a questionable decision to require opting-in to a testable code block.

Finally, I kept our sugar in the doc suite to omit lines starting with `#` in documentation but still process them during tests.

Closes #2925
[std::ascii] Add .to_ascii_opt() and .into_ascii_opt() returning Option

… instead of failing.

Make them default methods on the trait, and also make .to_ascii()
a default method while we’re at it.

Conflicts:
	src/libstd/ascii.rs
auto merge of #11022 : spaolacci/rust/0read, r=alexcrichton

Could prevent callers from catching the situation and lead to e.g early
iterator terminations (cf. `Reader::read_byte`) since `None` is only to
be returned only on EOF.
rustc: Add a lint for the obsolete crate-level link attribute
extra: impl IterBytes for uuid::Uuid
auto merge of #11091 : brson/rust/cratelinkattr, r=brson

This is set to *forbid* and prints a note explaining how to fix the problem.
auto merge of #11130 : olsonjeffery/rust/master, r=alexcrichton

So that `Uuid` can be used as the key in a `HashMap` or in a `HashSet`, etc

The only question I have about this is: Is endianness an issue, here? If so, what's the correct way to proceed?
Stop using C++ exceptions for stack unwinding.
auto merge of #11121 : vadimcn/rust/no-c++2, r=alexcrichton

This PR removes Rust's dependency on C++ for exception handling. Instead, it will use the unwind library API directly.

closes #10469
std::vec: correct .sort()'s doc-string and add some
examples/clarification to others.
std::vec: clarify & examplify more docs.
std: Introduce a Runtime trait

This trait is used to abstract the differences between 1:1 and M:N scheduling
and is the sole dispatch point for the differences between these two scheduling
modes.

This, and the following series of commits, is not intended to compile. Only
after the entire transition is complete are programs expected to compile.