<p><pre><code>    let on_heap = Box::new(...);

    function_that_accepts_lambda(move || {
        on_heap.bar();
    });
</code></pre>
This is sort of what kibwen was mentioning: move is a single annotation that overrides everything to capture by value rather than have it inferred.