blob: 4648bf046bc778d411deb9663ea6b0e7dcfdfa3d [file] [log] [blame]
error[E0623]: lifetime mismatch
--> $DIR/regions-free-region-ordering-callee.rs:13:5
|
LL | fn ordering2<'a, 'b>(x: &'a &'b usize, y: &'a usize) -> &'b usize {
| ------------- ---------
| |
| this parameter and the return type are declared with different lifetimes...
LL | // However, it is not safe to assume that 'b <= 'a
LL | &*y
| ^^^ ...but data from `x` is returned here
error[E0623]: lifetime mismatch
--> $DIR/regions-free-region-ordering-callee.rs:18:24
|
LL | fn ordering3<'a, 'b>(x: &'a usize, y: &'b usize) -> &'a &'b usize {
| --------- -------------
| |
| this parameter and the return type are declared with different lifetimes...
LL | // Do not infer an ordering from the return value.
LL | let z: &'b usize = &*x;
| ^^^ ...but data from `x` is returned here
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0623`.