Hoisting Expressions

Introduction There is an RFC open on Rust which proposes what I’m calling hoisting expressions into the language. These are expressions which can be introduced inside of closures-only (for now), and are hoisted by the compiler to run before the rest of the closure does. To illustrate how they work, consider this example: rust print! ( "hello " ); hoist { print! ( "world!" ) }; Copy Even though in…