1/6

By default a closure captures by reference — the least it can get away with. That is right for a closure used immediately, and wrong for one that outlives the scope it was created in.

move forces every capture to be taken by value:

fn make_greeter(name: String) -> Box<dyn Fn() -> String> {
    Box::new(move || format!("hello {name}"))
}

Without move, the closure would hold a reference to name, which dies when the function returns. With it, the closure owns name and can go anywhere.