47
The borrow checker within (smallcultfollowing.com)
you are viewing a single comment's thread
view the rest of the comments
[-] Giooschi@lemmy.world 3 points 5 months ago

It's mentioned in footnote 6:

As an example, to make this work I’m assuming some kind of “true deref” trait that indicates that Deref yields a reference that remains valid even as the value being deref’d moves from place to place. We need a trait much like this for other reasons too.

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 a String.

this post was submitted on 02 Jun 2024
47 points (100.0% liked)

Rust

5966 readers
19 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

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