]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr
Rollup merge of #88090 - nbdd0121:inference, r=nikomatsakis
[rust.git] / src / test / ui / borrowck / borrowck-reborrow-from-shorter-lived-andmut.stderr
1 error[E0623]: lifetime mismatch
2   --> $DIR/borrowck-reborrow-from-shorter-lived-andmut.rs:9:5
3    |
4 LL | fn copy_borrowed_ptr<'a,'b>(p: &'a mut S<'b>) -> S<'b> {
5    |                                -------------     -----
6    |                                |
7    |                                this parameter and the return type are declared with different lifetimes...
8 LL |     S { pointer: &mut *p.pointer }
9    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...but data from `p` is returned here
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0623`.