1 fn a<'a, 'b>(x: &mut &'a isize, y: &mut &'b isize) where 'b: 'a {
2 // Note: this is legal because of the `'b:'a` declaration.
6 fn b<'a, 'b>(x: &mut &'a isize, y: &mut &'b isize) {
7 // Illegal now because there is no `'b:'a` declaration.
8 *x = *y; //~ ERROR E0623
11 fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) {
12 // Here we try to call `foo` but do not know that `'a` and `'b` are
13 // related as required.
14 a(x, y); //~ ERROR lifetime mismatch [E0623]
18 // 'a and 'b are early bound in the function `a` because they appear
20 let _: fn(&mut &isize, &mut &isize) = a; //~ ERROR mismatched types
24 // 'a and 'b are late bound in the function `b` because there are
26 let _: fn(&mut &isize, &mut &isize) = b;