1 error[E0308]: mismatched types
2 --> $DIR/issue-79187-2.rs:8:5
5 | ^^^^^^^^ lifetime mismatch
7 = note: expected type `for<'r> Fn<(&'r i32,)>`
8 found type `Fn<(&i32,)>`
9 note: this closure does not fulfill the lifetime requirements
10 --> $DIR/issue-79187-2.rs:8:14
14 note: the lifetime requirement is introduced here
15 --> $DIR/issue-79187-2.rs:5:21
17 LL | fn take_foo(_: impl Foo) {}
20 error[E0308]: mismatched types
21 --> $DIR/issue-79187-2.rs:9:5
23 LL | take_foo(|a: &i32| a);
24 | ^^^^^^^^ lifetime mismatch
26 = note: expected reference `&i32`
27 found reference `&i32`
28 note: the anonymous lifetime #1 defined on the body at 9:14 doesn't meet the lifetime requirements
29 --> $DIR/issue-79187-2.rs:9:14
31 LL | take_foo(|a: &i32| a);
33 note: the lifetime requirement is introduced here
34 --> $DIR/issue-79187-2.rs:5:21
36 LL | fn take_foo(_: impl Foo) {}
39 error[E0308]: mismatched types
40 --> $DIR/issue-79187-2.rs:10:5
42 LL | take_foo(|a: &i32| -> &i32 { a });
43 | ^^^^^^^^ lifetime mismatch
45 = note: expected reference `&i32`
46 found reference `&i32`
47 note: the anonymous lifetime #1 defined on the body at 10:14 doesn't meet the lifetime requirements
48 --> $DIR/issue-79187-2.rs:10:14
50 LL | take_foo(|a: &i32| -> &i32 { a });
51 | ^^^^^^^^^^^^^^^^^^^^^^^
52 note: the lifetime requirement is introduced here
53 --> $DIR/issue-79187-2.rs:5:21
55 LL | fn take_foo(_: impl Foo) {}
58 error: aborting due to 3 previous errors
60 For more information about this error, try `rustc --explain E0308`.