Skip to main content

given_hints

Function given_hints 

Source
pub fn given_hints(
    text: &str,
    requirements: &[Requirement],
    requested: Span,
) -> Vec<InlayHint>
Expand description

v0.99 (DECISION E): the materializable ghost given inlay hints for a file.

Each uncovered capability requirement (its enclosing handler does not declare the capability) renders a ghost clause at the handler’s declaration site — … -> Effect[()] «given Clock» — whose text_edits write the real clause via the same given_insertion_edit the undeclared-capability quick-fix uses. Deduplicated per (insertion point, capability) so one handler that consumes a capability at several sites offers a single ghost. The ghost is positioned where the clause would be inserted, so accepting it reads naturally (given Clock, or , Clock after an existing clause).