Skip to content
Cracked
AI
Problems
Tracks
Roadmap
Articles
Leaderboard
Search
Ctrl K
Mode:
Rust
PyTorch
JAX
Python
Rust
C++
PyTorch
JAX
Python
Rust
C++
Log in
Sign up
Problems
Tracks
Articles
Roadmap
Leaderboard
Set up the runtime
Log in
Sign up
PyTorch
JAX
Python
Rust
C++
Radio
We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Lifetimes practice problems in Rust
Search problems
Difficulty:
Easy
Medium
Hard
Category:
Primitives
Framework
End-to-End
Research
Tag:
lifetimes
clippy
traits
ownership
iterators
unsafe
borrowing
concurrency
strings
performance
drop
async
collections
errors
api-design
macros
option
slices
allocation
closures
E0382
generics
edition-2024
macro-rules
ffi
metaprogramming
rc
structs
match
refcell
enums
modules
patterns
e0502
idiom
trait-objects
futures
interior-mutability
panic
raw-pointers
clone
dyn
E0277
guards
Mutex
parsing
smart-pointers
soundness
atomics
capstone
derive
determinism
E0507
executor
floats
hashmap
layout
moves
newtype
ordering
Show more tags
Sort:
Title
Easiest first
Hardest first
Recently added
Clear filters
Showing 19 of 19
Status
Title
Difficulty
Category
Tags
Borrow it or own it: your first lifetime decision
Easy
Primitives
lifetimes
borrowing
ownership
strings
E0515
Cow: borrow until you have to own
Medium
Primitives
cow
strings
allocation
lifetimes
clippy
Cow in API design: impl Into<Cow<str>>
Hard
Framework
cow
api-design
lifetimes
traits
strings
flat_map: expand a range spec like "1-3,7,10-12"
Medium
End-to-End
iterators
flat-map
lifetimes
parsing
strings
Generics, traits and lifetimes in one signature
Medium
Primitives
lifetimes
generics
traits
outlives
clippy
Let elision do it
Easy
Primitives
lifetimes
elision
clippy
strings
E0106
`longest`: writing your first `'a`
Medium
Primitives
lifetimes
elision
borrowing
iterators
E0621
Make the lint happy: `'_` in return paths
Easy
Primitives
lifetimes
elision
clippy
iterators
lints
Make your own collection iterable, all three ways
Hard
Framework
iterators
intoiterator
traits
lifetimes
collections
move: when the closure must own its captures
Medium
Primitives
closures
move
ownership
trait-objects
lifetimes
Needless clone: the most common review comment in Rust
Medium
End-to-End
clone
borrowing
allocation
lifetimes
performance
review
Non-lexical lifetimes: a borrow ends at its last use
Easy
Primitives
borrowing
nll
lifetimes
e0502
slices
Returning impl Trait, and what edition 2024 changed
Hard
Primitives
impl-Trait
RPIT
lifetimes
edition-2024
closures
dyn
Slices are borrows
Easy
Primitives
borrowing
slices
strings
lifetimes
zero-copy
Trait objects and lifetimes: Box<dyn Trait + 'a>
Hard
Primitives
lifetimes
trait-objects
closures
boxed
hrtb
dyn
`T: 'static` in practice — a type-erased handler registry
Hard
End-to-End
lifetimes
static
trait-objects
closures
E0310
E0521
Two inputs, one output lifetime
Medium
Primitives
lifetimes
borrowing
api-design
strings
unicode
Zero-copy parsing: borrow, don't allocate
Medium
Primitives
strings
lifetimes
borrowing
parsing
allocation
Zero-copy tokenizer: `Parser<'a>`
Hard
End-to-End
lifetimes
structs
zero-copy
parsing
E0621
E0499