1 error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce`
2 --> $DIR/closure-origin-array-diagnostics.rs:9:13
5 | ^^ this closure implements `FnOnce`, not `Fn`
7 | - closure is `FnOnce` because it moves the variable `s` out of its environment
10 | --------- - the requirement to implement `Fn` derives from here
12 | required by a bound introduced by this call
14 note: required by a bound in `expect_fn`
15 --> $DIR/closure-origin-array-diagnostics.rs:5:17
17 LL | fn expect_fn<F: Fn()>(_f: F) {}
18 | ^^^^ required by this bound in `expect_fn`
20 error: aborting due to previous error
22 For more information about this error, try `rustc --explain E0525`.