Skip to main content

get_primary_span

Function get_primary_span 

Source
pub fn get_primary_span(diag: &RustcDiagnostic) -> Option<&RustcSpan>
Expand description

Extracts the primary source span from a diagnostic.

Diagnostics may have multiple spans; this returns the one marked as primary (the main error location).