rustc: Strip struct fields and enum variants

Closes #11085
Rewrite SyntaxEnv

I'd really like to be able to do something like

struct MapChain<'next, K, V> {
    info: BlockInfo,
    map: HashMap<K, V>,
    next: Option<&'next mut MapChain<'next, K, V>
}

but I can't get the lifetimes to work out.
Add testing tutorial to docs
Fix usage of rustc --ls on invalid files

Closes #11259
auto merge of #11093 : alexcrichton/rust/issue-11085, r=pcwalton

Closes #11085
auto merge of #11052 : jvns/rust/testing-tutorial, r=brson

There's no explanation anywhere right now of how to do testing with Rust, so here's a basic explanation of how to write and run a test.
Add read_to_str and write_{str, line}

These methods are sorely needed on readers and writers, and I believe that the
encoding story should be solved with composition. This commit adds back the
missed functions when reading/writing strings onto generic Readers/Writers.
auto merge of #10861 : alexcrichton/rust/iostr, r=pcwalton

These methods are sorely needed on readers and writers, and I believe that the
encoding story should be solved with composition. This commit adds back the
missed functions when reading/writing strings onto generic Readers/Writers.
auto merge of #11228 : sfackler/rust/syntaxenv, r=pcwalton

I'd really like to be able to do something like

```rust
struct MapChain<'next, K, V> {
    info: BlockInfo,
    map: HashMap<K, V>,
    next: Option<&'next mut MapChain<'next, K, V>
}
```

but I can't get the lifetimes to work out.
auto merge of #11262 : alexcrichton/rust/issue-11259, r=pcwalton

Closes #11259
Don't allow single-variant enums to be dereferenced. #6246

I'm not sure if this was even intentional at this point.
Don't allow newtype structs to be dereferenced. #6246
rustc: Add error about obsolete struct deref