Skip to main content

get_error_code

Function get_error_code 

Source
pub fn get_error_code(diag: &RustcDiagnostic) -> Option<&str>
Expand description

Extracts the error code (e.g., “E0382”) from a diagnostic.

Returns None if the diagnostic has no associated error code.