You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ^^ --- closure is `FnOnce` because it moves the variable `y` out of its environment
6
+
| |
7
+
| this closure implements `FnOnce`, not `Fn`
4
8
LL | foo(c);
5
-
| --- ^ expected an `Fn()` closure, found `{closure@$DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:14:13: 14:15}`
9
+
| --- - the requirement to implement `Fn` derives from here
6
10
| |
7
11
| required by a bound introduced by this call
8
12
|
9
-
= help: the trait `Fn<()>` is not implemented for closure `{closure@$DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:14:13: 14:15}`
10
-
= note: wrap the `{closure@$DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:14:13: 14:15}` in a closure with no arguments: `|| { /* code */ }`
11
-
= note: `{closure@$DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:14:13: 14:15}` implements `FnOnce`, but it must implement `Fn`, which is more general
0 commit comments