Skip to main content

check_record_in

Function check_record_in 

Source
pub fn check_record_in(
    input: ResolvedCommons,
    ty_intern: &Arc<Types>,
    refs: &mut RefSink,
    hints: &mut HintSink,
    locals: &mut LocalsSink,
    requirements: &mut RequirementSink,
) -> RecordCheck
Expand description

check_record against a caller-supplied intern table (T3.6b, R4.1).

The per-invocation table check_record mints is the right default: one unit, one table, ids that never escape it. A project check is the case that needs more — it runs check_record once per unit but funnels every unit’s expr_types into one ExprTypeSink, so a TyId recorded there would be ambiguous if each unit interned into a table of its own. Sharing one table across the whole analysis makes those ids mean one thing, and is strictly safer than the per-unit case the track doc argued for: ids are still only ever compared against ids from the same table.