A bunch of random modifications r? oli-obk Kitchen sink of changes that I didn't know where to put elsewhere. Documentation tweaks mostly, but also removing some unreachable code and simplifying the pretty printing for closures/coroutines.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.