this post was submitted on 22 Oct 2023
7 points (88.9% liked)
Rust
6117 readers
3 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don't understand this. Shared references to
String
areCopy
, too. This doesn't have to do anything with sizes. Rather, it's implemented in the compiler, because it's sound to have it and a huge QoL improvement over the alternative... just the same reason why e.g.usize
isCopy
, really.No, it's not really related to the heap.
Box
implementsDerefMut
, which is in-depth explained here.