You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An &fn would be copyable, because the environment would be immutable. The limitations would match the ones placed on regular borrowed pointers (&mut is moveable, & is immutable) so I think it would result in a more intuitive system.
This would be required to make #8622 (adding dynamically sized bare function objects) backwards compatible but can be implemented independently and will not be an enormous task. All existing &fn would become &mut fn and it will remain the default since &mut coerces to & by-move.
The text was updated successfully, but these errors were encountered:
…arth
Escape `mod.rs` file mentions to avoid links in our documentation
As the title says nothing special, still a fun fix :)
Closes: rust-lang#8627
changelog: none
An
&fn
would be copyable, because the environment would be immutable. The limitations would match the ones placed on regular borrowed pointers (&mut
is moveable,&
is immutable) so I think it would result in a more intuitive system.This would be required to make #8622 (adding dynamically sized bare function objects) backwards compatible but can be implemented independently and will not be an enormous task. All existing
&fn
would become&mut fn
and it will remain the default since&mut
coerces to&
by-move.The text was updated successfully, but these errors were encountered: