fn primary_location(
config: &DiagnosticsMapConfig,
workspace_root: &AbsPath,
span: &DiagnosticSpan,
snap: &GlobalStateSnapshot,
) -> LocationExpand description
Extracts a suitable “primary” location from a rustc diagnostic.
This takes locations pointing into the standard library, or generally outside the current workspace into account and tries to avoid those, in case macros are involved.