Skip to main content

code_captures_variable

Function code_captures_variable 

Source
pub fn code_captures_variable(name: &SmolStr, code: &[Expr]) -> bool
Expand description

Whether an anonymous function written anywhere in code reads or writes name from the scope around it.

This is what decides whether a variable lives in a cell: one no closure names keeps its register and costs what it costs today.