Skip to main content

let_pattern_src

Function let_pattern_src 

Source
pub fn let_pattern_src(p: &Pattern) -> String
Expand description

#2010: a let … else pattern as source. After let, a bare name is a binding, not a pattern (let Missing | Late = p would re-parse as a binding named Missing), so a pattern whose text opens with a name not followed by (, . or { keeps the parentheses its author had to write. None, true and false are keywords, not names, so they need none.