Skip to main content

primary_location

Function primary_location 

Source
fn primary_location(
    config: &DiagnosticsMapConfig,
    workspace_root: &AbsPath,
    span: &DiagnosticSpan,
    snap: &GlobalStateSnapshot,
) -> Location
Expand 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.