Skip to main content

resolve_annotation_consts

Function resolve_annotation_consts 

Source
pub fn resolve_annotation_consts(
    groups: &BTreeMap<String, Vec<usize>>,
    kinds: &BTreeMap<String, UnitKind>,
    parsed: &mut [ParsedFile],
    unit_tables: &mut HashMap<String, UnitTable>,
    unit_uses: &HashMap<String, Vec<String>>,
    refs: &mut RefSink,
)
Expand description

Phase 5c: resolve a constant named by a literal-only annotation argument to the literal it denotes, in every production unit. Run after uses resolution (a used commons’ public constants are in scope) and before anything reads an annotation argument. A unit whose declarations changed has its symbol table rebuilt from the rewritten files, so the table holds the resolved literals too; the rebuild’s own diagnostics were already reported by the first build.