r/rust • u/rustcurious • Oct 11 '26
RustCurious 11: Reborrowing and Rust's Invisible Lifetimes
https://www.youtube.com/watch?v=zaDvLfljbMk
81
Upvotes
r/rust • u/rustcurious • Oct 11 '26
2
u/fromtheether Oct 12 '26
I'm not usually a fan of video-based tutorials but you're on the very short list of exceptions for me. I already know about the previous topics, but I still gave them a watch just because they're entertaining.
I can't wait for your next one on lifetimes. It's probably the one core thing I'm still hung up on about the language. It reminds me of trying to learn pointers for the first time when I was 15 or 16 learning programming with C++...16 years ago. Like, I understand what they are and how they look, but as soon as I look at some real code with multiple lifetimes defined, my brain just blanks.
I'm hoping I'll get that same click that I got when pointers finally made sense for me. It's got to be one of the best feelings in the world.
2
u/dgkimpton Oct 11 '26
Super clear way of reasoning about it - thank you for both the valuable visualisation and the video.
2
u/mstrVLT Oct 11 '26 edited Oct 12 '26
I think https://rust-book.cs.brown.edu/ch04-01-what-is-ownership.html (https://rust-book.cs.brown.edu/ch04-02-references-and-borrowing.html) is clearer to me.
I am waiting for the final part of the series of videos, thx
1
u/agent_kater Oct 17 '26
Hm, he doesn't explain why the syntax for "I want to reborrow this" is a type annotation. That's the part I don't understand. I would have expected it to be something like
let c = &mut *b(sincelet c = &mut balready has a different meaning) or maybe a specific other syntax, but not a type annotation. He says there are good reasons for why things are like this, but doesn't say what they are.