Maybe I’m misunderstanding, but why is that not possible with a
Fn(_: T) -> T Fn(_: T) -> TOne place you might see something like it is if an API takes ownership, but returns it on error; you see the error side carry the resource you gave it, so you could try again.
Fn(_: &mut T)
?What is different?
When passing a mutable reference, the lifetime of the object is largely decided by "foo" (with some caveats).
Now, let's say that "foo" instead calls "fn bar(_: T) -> T".
When passing the object itself, the lifetime is largely decided/decide-able by "bar".