r/ProgrammingLanguages • u/jamiiecb • Apr 10 '26
Borrow-checking surprises
https://www.scattered-thoughts.net/writing/borrow-checking-surprises
52
Upvotes
r/ProgrammingLanguages • u/jamiiecb • Apr 10 '26
View all comments
Show parent comment
3
u/iBPsThrowingObject Apr 11 '26
Yeah no, none of those special cases are relaxing enforcement. The example in my comment is a caused by this:
This is actually can also be explained in the terms of borrowchecking: Drop takes &mut Self, while "dropping" a trivial value does absolutely nothing