|
Accessing an owned value while it is borrowed
|
Medium
|
Primitives
|
|
|
Borrowing through Option
|
Medium
|
Primitives
|
|
|
Borrow it or own it: your first lifetime decision
|
Easy
|
Primitives
|
|
|
Carry a running maximum through mutable iteration
|
Medium
|
Primitives
|
|
|
Choose parameter types and shrink an enum
|
Medium
|
Primitives
|
|
|
Closures hold their borrows
|
Medium
|
Primitives
|
|
|
Count words with the HashMap entry API
|
Hard
|
Primitives
|
|
|
E0499: cannot borrow as mutable more than once
|
Medium
|
Primitives
|
|
|
E0502: cannot borrow as mutable because also borrowed as immutable
|
Easy
|
Primitives
|
|
|
Filter records without cloning their tags
|
Medium
|
End-to-End
|
|
|
Fn, FnMut, FnOnce: the closure hierarchy
|
Medium
|
Primitives
|
|
|
How to read a borrow-check diagnostic
|
Easy
|
Primitives
|
|
|
iter, iter_mut, into_iter: all three, one Vec
|
Easy
|
Primitives
|
|
longest: writing your first 'a
|
Medium
|
Primitives
|
|
|
Move or borrow: the two ways to pass a value
|
Easy
|
Primitives
|
|
&mut: exclusive access, and why mut appears twice
|
Easy
|
Primitives
|
|
|
Non-lexical lifetimes: a borrow ends at its last use
|
Easy
|
Primitives
|
|
|
Read a log after its closure finishes
|
Medium
|
Primitives
|
|
|
Reborrowing: why &mut sometimes moves and sometimes doesn't
|
Hard
|
Primitives
|
|
|
ref, ref mut, and default binding modes in edition 2024
|
Medium
|
Primitives
|
|
|
Remove matching values without invalidating iteration
|
Medium
|
Primitives
|
|
|
Scoped threads: borrow, do not clone
|
Easy
|
Primitives
|
|
|
Set algebra with BTreeSet
|
Easy
|
Primitives
|
|
|
Share a log with RefCell and report borrow conflicts
|
Medium
|
Primitives
|
|
|
Slices are borrows
|
Easy
|
Primitives
|
|
|
split_at_mut and the disjointness-proof APIs
|
Medium
|
Primitives
|
|
|
Split borrows: the checker reasons about places, not variables
|
Medium
|
Primitives
|
|
&str not &String, &[T] not &Vec<T>: deref coercion and ptr_arg
|
Easy
|
Primitives
|
|
|
Subtract the minimum with a mutable iterator
|
Medium
|
Primitives
|
|
|
Two inputs, one output lifetime
|
Medium
|
Primitives
|
|
|
Two-phase borrows: why v.push(v.len()) compiles
|
Hard
|
Primitives
|
|
|
What a &mut parameter actually promises
|
Medium
|
Primitives
|
|
|
Zero-copy parsing: borrow, don't allocate
|
Medium
|
Primitives
|
|