Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustimpl TraitSingle-choice MCQ

Why does this closure-returning function require `impl Fn` (or boxing) rather than a concrete return type?

fn make_adder(n: i32) -> impl Fn(i32) -> i32 { move |x| x + n }