1 error[E0308]: mismatched types
2 --> $DIR/issue-71955.rs:54:5
4 LL | foo(bar, "string", |s| s.len() == 5);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
7 = note: expected type `for<'r, 's> FnOnce<(&'r &'s str,)>`
8 found type `for<'r> FnOnce<(&'r &str,)>`
9 note: this closure does not fulfill the lifetime requirements
10 --> $DIR/issue-71955.rs:54:24
12 LL | foo(bar, "string", |s| s.len() == 5);
14 note: the lifetime requirement is introduced here
15 --> $DIR/issue-71955.rs:34:9
17 LL | F2: FnOnce(&<F1 as Parser>::Output) -> bool
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 error[E0308]: mismatched types
21 --> $DIR/issue-71955.rs:54:5
23 LL | foo(bar, "string", |s| s.len() == 5);
24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
26 = note: expected type `FnOnce<(&&str,)>`
27 found type `for<'r> FnOnce<(&'r &str,)>`
28 note: this closure does not fulfill the lifetime requirements
29 --> $DIR/issue-71955.rs:54:24
31 LL | foo(bar, "string", |s| s.len() == 5);
33 note: the lifetime requirement is introduced here
34 --> $DIR/issue-71955.rs:34:44
36 LL | F2: FnOnce(&<F1 as Parser>::Output) -> bool
39 error[E0308]: mismatched types
40 --> $DIR/issue-71955.rs:58:5
42 LL | foo(baz, "string", |s| s.0.len() == 5);
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
45 = note: expected type `for<'r, 's> FnOnce<(&'r Wrapper<'s>,)>`
46 found type `for<'r> FnOnce<(&'r Wrapper<'_>,)>`
47 note: this closure does not fulfill the lifetime requirements
48 --> $DIR/issue-71955.rs:58:24
50 LL | foo(baz, "string", |s| s.0.len() == 5);
52 note: the lifetime requirement is introduced here
53 --> $DIR/issue-71955.rs:34:9
55 LL | F2: FnOnce(&<F1 as Parser>::Output) -> bool
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
58 error[E0308]: mismatched types
59 --> $DIR/issue-71955.rs:58:5
61 LL | foo(baz, "string", |s| s.0.len() == 5);
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
64 = note: expected type `FnOnce<(&Wrapper<'_>,)>`
65 found type `for<'r> FnOnce<(&'r Wrapper<'_>,)>`
66 note: this closure does not fulfill the lifetime requirements
67 --> $DIR/issue-71955.rs:58:24
69 LL | foo(baz, "string", |s| s.0.len() == 5);
71 note: the lifetime requirement is introduced here
72 --> $DIR/issue-71955.rs:34:44
74 LL | F2: FnOnce(&<F1 as Parser>::Output) -> bool
77 error: aborting due to 4 previous errors
79 For more information about this error, try `rustc --explain E0308`.