Skip to main content

record_capability_clause_ref

Function record_capability_clause_ref 

Source
pub fn record_capability_clause_ref(
    name: &Ident,
    cross_context: &CrossContextInfo,
    refs: &mut RefSink,
)
Expand description

v0.15: validate one given capability reference. A bare reference must name a capability declared in this context; a cross-context reference (given B.Cap) must name a capability the consumed context exports. Returns the local CapabilityInfo to add to the in-scope map for bare references; cross-context references return None (their calls are type-checked via consumed_capabilities at the call site) but are still validated here. v0.25: record a clause-position capability reference (provides Cap, bare given Cap), qualifying a flattened bare name to its providing unit. The span is the name segment only.