blob: a43ee7ec3ace0d9c6f41ad11cec64c9daf95e218 [file] [log] [blame]
error[E0623]: lifetime mismatch
--> $DIR/regions-lifetime-bounds-on-fns.rs:8:10
|
LL | fn b<'a, 'b>(x: &mut &'a isize, y: &mut &'b isize) {
| --------- --------- these two types are declared with different lifetimes...
LL | // Illegal now because there is no `'b:'a` declaration.
LL | *x = *y; //~ ERROR E0623
| ^^ ...but data from `y` flows into `x` here
error[E0623]: lifetime mismatch
--> $DIR/regions-lifetime-bounds-on-fns.rs:14:7
|
LL | fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) {
| --------- --------- these two types are declared with different lifetimes...
...
LL | a(x, y); //~ ERROR lifetime mismatch [E0623]
| ^ ...but data from `y` flows into `x` here
error[E0308]: mismatched types
--> $DIR/regions-lifetime-bounds-on-fns.rs:20:43
|
LL | let _: fn(&mut &isize, &mut &isize) = a; //~ ERROR E0308
| ^ one type is more general than the other
|
= note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize)`
error: aborting due to 3 previous errors
Some errors occurred: E0308, E0623.
For more information about an error, try `rustc --explain E0308`.