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
In section 4, stack pinning is said to require unsafe, and it talks about the pitfalls that can come from dropping a Pin early. However, with the new pin macro, there is a safe way to pin something to the stack, and the pitfalls the book mentions can be checked by the compiler, since the inner value gets moved into the pin (and so cannot be used after being passed to the macro).
It’s a relatively new feature, so even if we can’t replace the existing content, we should probably mention it.
The text was updated successfully, but these errors were encountered:
In section 4, stack pinning is said to require
unsafe
, and it talks about the pitfalls that can come from dropping aPin
early. However, with the newpin
macro, there is a safe way to pin something to the stack, and the pitfalls the book mentions can be checked by the compiler, since the inner value gets moved into the pin (and so cannot be used after being passed to the macro).It’s a relatively new feature, so even if we can’t replace the existing content, we should probably mention it.
The text was updated successfully, but these errors were encountered: