You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-12-23 06:56:25 +02:00
The current example demonstrating how rustc prevents dangling references is really gross and hard to read (my own fault lol, I wrote that example). I finally realized that there's a much simpler, easier to read way of expressing the same thing. I also moved this to its own slide after the reference slides so that we can call it out as an early example of the borrow checker. I then call back to this example in the borrow checker slide to remind students that the aliasing rule isn't the only thing the borrow checker is enforcing.