Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Rust
/
Pin and Unpin
What happens when a Pin<Box<T>> binding is moved to another variable?
from Pin and Unpin
Rust 1.98
intermediate
1 min
What happens when a Pin<Box<T>> binding is moved to another variable?
The pointer handle moves, while the T in the Box allocation stays at its address.
Both the handle and T are copied byte for byte to new addresses.
The assignment is rejected whenever T is !Unpin.
T is dropped before the new binding is initialized.
Check
Ask AI about this kata
Report an error
previous kata
Why does Future::poll receive self as Pin<&mut Self>?
Quiz
next kata
Which three lines does this program print, in order?
Predict the output
A new version is available
Reload