something.unwrap_or_else(|err| {
writeln!(io::stderr(), "{}", err);
process::exit(1);
}
This is really just a function call. There are no references to an outer scope. But Rust requires a closure there. You can't pass a pointer to a function.You'd like for this to optimize down to a function call, without saving any state from the outer scope. Don't know if Rust does this yet.