this post was submitted on 02 Jun 2024
47 points (100.0% liked)
Rust
6005 readers
2 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 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I’m curious how they plan on implementing interior references while keeping structs that contain them movable and without breaking the “moving structs is always just memcpy” assumption.
All of these would be great to have though, would make the language a lot more ergonomic. I hope they get implemented.
The more I thought about the interior references part the more questions I had! For example:
So, with all of that said, I'd love to read an article with more details on that part!
It's mentioned in footnote 6:
It would only work for references that are stable after the value they reference is moved. Think for example of a
&str
you get from aString
.