pub fn format(diagnostic: Diagnostic) -> Option<String>
Formats a diagnostic into a human-readable string.