I had some more notes for the GC lecture but obviously it got too long for these.

So what does Rust do?

Note that all the things above are “…assuming you don’t use the unsafe keyword.” Rust does let you do all the same horrible things that C and C++ do, but it’s explicitly gated behind a language feature which, unless you are doing really scary stuff, you will never need to use.

Assignment and duplicating values



Rules of borrowing

Single-owner pointers

  1. I don’t know if there’s a proper name for these types. !Clone is technically right but not very descriptive, so I came up with “move-only,” since they can only be moved.