Peter F.@hachyderm.iotoRust@programming.dev•Debug-time enforcement of borrowing rules, and safety in general.
2·
4 months ago@Jenztsch @FizzyOrange it would be nice if rust had a feature like inline macros for this kind of behavior just for reducing duplications when you don’t need to capture values as part of a closure.
@Jenztsch @FizzyOrange
Eg
fn foo() -\> Vec\<i32\> { let mut out = Vec::new(); macro! bar(i: i32) { out.push(i); } for i in 1..10 { bar!(i); } out }