1 error: lifetime may not live long enough
2 --> $DIR/expect-fn-supply-fn.rs:16:49
4 LL | fn expect_free_supply_free_from_fn<'x>(x: &'x u32) {
5 | -- lifetime `'x` defined here
7 LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
10 | has type `fn(&'1 u32)`
11 | requires that `'1` must outlive `'x`
13 error: lifetime may not live long enough
14 --> $DIR/expect-fn-supply-fn.rs:16:49
16 LL | fn expect_free_supply_free_from_fn<'x>(x: &'x u32) {
17 | -- lifetime `'x` defined here
19 LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
20 | ^ requires that `'x` must outlive `'static`
22 = help: consider replacing `'x` with `'static`
24 error[E0308]: mismatched types
25 --> $DIR/expect-fn-supply-fn.rs:32:49
27 LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
28 | ^ one type is more general than the other
30 = note: expected fn pointer `for<'r> fn(&'r u32)`
31 found fn pointer `fn(&u32)`
33 error[E0308]: mismatched types
34 --> $DIR/expect-fn-supply-fn.rs:39:50
36 LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
37 | ^ one type is more general than the other
39 = note: expected fn pointer `fn(&'x u32)`
40 found fn pointer `for<'r> fn(&'r u32)`
42 error[E0308]: mismatched types
43 --> $DIR/expect-fn-supply-fn.rs:48:50
45 LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
46 | ^ one type is more general than the other
48 = note: expected fn pointer `fn(&u32)`
49 found fn pointer `for<'r> fn(&'r u32)`
51 error: aborting due to 5 previous errors
53 For more information about this error, try `rustc --explain E0308`.