pub(crate) fn type_mismatch( ctx: &DiagnosticsContext<'_, '_>, d: &TypeMismatch<'_>, ) -> Option<Diagnostic>