Skip to main content

pattern_vars

Function pattern_vars 

Source
pub fn pattern_vars<'d>(root: SemNode<'d>) -> Vec<Symbol<'d>>
Expand description

Every pattern variable bound anywhere in the subtree of root (if (e matches p), case (e) matches, e matches p ? a : b), once each, in source order. Variables are told apart by SymbolUid::uid; a ?: pattern’s variable lives in no scope, so two of them with the same name share a key (and a slot) – codegen refuses the pair when their types differ in width.