2018-08-08 12:28:26 +00:00
|
|
|
error[E0597]: `*p` does not live long enough
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/regions-infer-borrow-scope-too-big.rs:11:23
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let xc = x_coord(&*p); //~ ERROR `*p` does not live long enough
|
|
|
|
| ^^ borrowed value does not live long enough
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - borrowed value only lives until here
|
|
|
|
|
|
2018-12-25 15:56:47 +00:00
|
|
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 10:8...
|
|
|
|
--> $DIR/regions-infer-borrow-scope-too-big.rs:10:8
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2018-12-17 03:21:47 +00:00
|
|
|
LL | fn foo<'a>(p: Box<Point>) -> &'a isize {
|
2018-08-08 12:28:26 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|