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
error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:18:9: 18:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()`
2
+
--> $DIR/closure-mismatch.rs:18:5
3
+
|
4
+
18 | baz(|_| ());
5
+
| ^^^ expected bound lifetime parameter, found concrete lifetime
6
+
|
7
+
= note: concrete lifetime that was found is lifetime '_#0r
8
+
= note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
9
+
= note: required by `baz`
10
+
11
+
error[E0594]: closure mismatch: `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]` implements the trait `std::ops::Fn<(_,)>`, but the trait `for<'r> std::ops::Fn<(&'r (),)>` is required
12
+
--> $DIR/closure-mismatch.rs:18:5
13
+
|
14
+
18 | baz(|_| ());
15
+
| ^^^ ------ expected concrete lifetime, found bound lifetime parameter
16
+
|
17
+
= note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
0 commit comments