Practice
Learn
← Quit
0 / 0 correct
Rust
Hard
1 of 663
What does mem::swap(&mut a, &mut b) require and guarantee?
A
a and b must be Copy
B
It allocates temporary heap memory
C
It only works for integers
D
Two distinct mutable references; exchanges values without running destructors or cloning