> The idea that a fn (no closure) could implicitly turn into a block (mutable
> closure) seemed freaky when I read the tutorial.

There is no actual allocation going on -- the function pointer is
paired with a null environment pointer, and that's the closure. You
pay nothing, and since a (non-closing) fn can't do anything that a
closure couldn't do, I'm not sure why you'd call this freaky.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to