Expand description
v0.30.2 (ADR 0063): the expression-type sink.
The checker computes expr_types: HashMap<Span, Ty> per file as it types
each expression, but that map rides inside the Ok(TypedCommons) payload
check_record drops on error, and the LSP Analyse path discards it
entirely. This sink carries it out to the analysis so completion can ask
“what is the type of the expression at this offset?” (the receiver before
a .), mirroring HintSink.
Capture is on the Ok path — a file’s types are recorded only when it
checks clean (check_record returns Ok), so a mid-edit file with errors
yields nothing for that file (the slice-3 “clean-file ceiling”, ADR 0063).
Unlike hints, test/integration files are not muted (completion runs in
them); only synthetic toolchain-injected files are.
Structs§
- Expr
Type Sink - Records per-file expression types. A fresh sink records nothing until
enter_fileattributes it.
Functions§
- type_
at_ offset - The type of the innermost expression whose span contains
offset, if any — the receiver-typing query for.-member completion.
Type Aliases§
- File
Expr Types - Project-relative source path → that file’s
(expr span, type)entries, ordered by span (innermost-last within a start, so a containment search can prefer the tightest match).