blob: 4142fc488c0dd23cff839c77a9c979e27f7c75d8 [file] [log] [blame]
error[E0623]: lifetime mismatch
--> $DIR/borrowck-reborrow-from-shorter-lived-andmut.rs:9:5
|
LL | fn copy_borrowed_ptr<'a,'b>(p: &'a mut S<'b>) -> S<'b> {
| ------------- -----
| |
| this parameter and the return type are declared with different lifetimes...
LL | S { pointer: &mut *p.pointer }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...but data from `p` is returned here
error: aborting due to previous error