|
|
|
|
|
by scotty79
1262 days ago
|
|
How does it look like? Do you mean this? https://haibane-tenshi.github.io/rust-reborrowing/ If you assume = always moves you can just never use automatic reborrowing (do &mut * instead) and you'll loose nothing. I don't think that's a very common pattern, fully optional and it can be just treated as another exception to the rule, just like Copy types. You don't have to manually write .copy() in some cases, and you don't have to manually write &mut* in some others. But that's what happens. Move is still done. So that's total of two exceptions. Way easier to be tackled individually when the time comes than assuming = means something else, or something complex from the start. |
|