error: lifetime may not live long enough --> $DIR/regions-lifetime-bounds-on-fns.rs:8:5 | LL | fn b<'a, 'b>(x: &mut &'a isize, y: &mut &'b isize) { | -- -- lifetime `'b` defined here | | | lifetime `'a` defined here LL | // Illegal now because there is no `'b:'a` declaration. LL | *x = *y; | ^^^^^^^ assignment requires that `'b` must outlive `'a` | = help: consider adding the following bound: `'b: 'a` error: lifetime may not live long enough --> $DIR/regions-lifetime-bounds-on-fns.rs:14:5 | LL | fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) { | -- -- lifetime `'b` defined here | | | lifetime `'a` defined here ... LL | a(x, y); | ^^^^^^^ argument requires that `'b` must outlive `'a` | = help: consider adding the following bound: `'b: 'a` = note: requirement occurs because of a mutable reference to &isize = note: mutable references are invariant over their type parameter = help: see for more information about variance error[E0308]: mismatched types --> $DIR/regions-lifetime-bounds-on-fns.rs:20:12 | LL | let _: fn(&mut &isize, &mut &isize) = a; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | = note: expected fn pointer `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` found fn pointer `for<'r, 's> fn(&'r mut &isize, &'s mut &isize)` error[E0308]: mismatched types --> $DIR/regions-lifetime-bounds-on-fns.rs:20:12 | LL | let _: fn(&mut &isize, &mut &isize) = a; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | = note: expected fn pointer `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` found fn pointer `for<'r, 's> fn(&'r mut &isize, &'s mut &isize)` error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0308`.