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 error[E0308]: mismatched types
23 --> $DIR/expect-fn-supply-fn.rs:32:49
25 LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
26 | ^ one type is more general than the other
28 = note: expected fn pointer `fn(&u32)`
29 found fn pointer `for<'a> fn(&'a u32)`
31 error[E0308]: mismatched types
32 --> $DIR/expect-fn-supply-fn.rs:39:50
34 LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
35 | ^ one type is more general than the other
37 = note: expected fn pointer `for<'a> fn(&'a u32)`
38 found fn pointer `fn(&u32)`
40 error[E0308]: mismatched types
41 --> $DIR/expect-fn-supply-fn.rs:48:50
43 LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
44 | ^ one type is more general than the other
46 = note: expected fn pointer `for<'a> fn(&'a u32)`
47 found fn pointer `fn(&u32)`
49 error: aborting due to 5 previous errors
51 For more information about this error, try `rustc --explain E0308`.