Closures are allowed to reference data that may be dropped before the closure itself is dropped currently. This will result in undefined behavior. This can't be meaningfully prevented in C++, but we aren't even preventing this in Rust.