Documentation tests can now compile-fail

Minimum Rust version: 1.22

You can now create compile-fail tests in Rustdoc, like this:

  1. /// ```compile_fail
  2. /// let x = 5;
  3. /// x += 2; // shouldn't compile!
  4. /// ```
  5. # fn foo() {}

Please note that these kinds of tests can be more fragile than others, asadditions to Rust may cause code to compile when it previously would not.Consider the first release with ?, for example: code using ? would failto compile on Rust 1.21, but compile successfully on Rust 1.22, causing yourtest suite to start failing.