README.md
Lesson 8: Lifetimes demystified
This lesson covers lifetimes demystified. You'll read a short explanation, try three small exercises and finish with a quiz.
Read the full lesson: https://glibcode.net/courses/rust-ownership/lessons/8
Files
src/main.rs: lifetime annotations when the compiler needs them
Tip:
cargo clippyexplains a lot of borrow-checker surprises in plain words.
Tip: Read the whole compiler message: the note at the end usually has the fix.
Tip:
cargo checkis much faster thancargo buildwhile you are still fixing errors.
Run it
cargo run
Exercises
See exercises.md. Ask in the forum once you've tried.