Diagnostic API fixes Some improvements to diagnostic APIs: improve some naming, use shortcuts in more places, and add a couple of missing methods. r? `@compiler-errors`
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.