Skip to main content

without_resolve_echoes

Function without_resolve_echoes 

Source
pub fn without_resolve_echoes(
    checked: Vec<CompileError>,
    resolve_errors: &[CompileError],
    item_spans: &[Span],
) -> Vec<CompileError>
Expand description

#1663 (Decision A): the checker’s diagnostics after a resolve that reported errors, keeping only those in declarations the resolver found clean.

Resolve-then-check is per declaration: an unknown name in b must not hide a type error in a, so the checker runs over every declaration. Inside a declaration the resolver rejected, the checker would only meet the same fault again — under the same code (unknown_function), under its own twin code (types.unknown_static_member), or as a follow-on (unknown_name for a misplaced self, type_in_expr beside an unknown variant). The resolver’s report is the one that names the fault, so that declaration keeps only it. item_spans are the unit’s top-level declarations’ spans (CommonsItem::span). A diagnostic outside every declaration is kept unless it overlaps a resolve error.