b5f5bdce87
Use `&mut Diagnostic` instead of `&mut DiagnosticBuilder` unless needed This seems to be the established convention (02ff9e0) when `DiagnosticBuilder` was first added. I am guilty of introducing some of these.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.