Skip to content

Generics practice problems in Rust

Difficulty:
Category:
Tag:

Showing 14 of 14

Status Title Difficulty
A generic Stack, and conditional impl blocks Medium
Associated type or generic parameter? Hard
Deriving traits, and when derive gets the bounds wrong Easy
drop(x) is just a function Easy
Fn, FnMut, FnOnce: the closure hierarchy Medium
Folding an AST: separating traversal from action Hard
Generic functions and monomorphisation Easy
Generics, traits and lifetimes in one signature Medium
impl Trait in argument position is not a generic Medium
IntoIterator: one bound that accepts five containers Medium
Trait bounds and why f64 is not Ord Easy
Traits as shared behaviour Easy
where clauses and the bound you cannot write inline Easy
Write your own adapters, with an extension trait Hard