]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / regions / regions-infer-borrow-scope-too-big.stderr
1 error[E0597]: `*p` does not live long enough
2   --> $DIR/regions-infer-borrow-scope-too-big.rs:11:23
3    |
4 LL |     let xc = x_coord(&*p); //~ ERROR `*p` does not live long enough
5    |                       ^^ borrowed value does not live long enough
6 ...
7 LL | }
8    | - borrowed value only lives until here
9    |
10 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 10:8...
11   --> $DIR/regions-infer-borrow-scope-too-big.rs:10:8
12    |
13 LL | fn foo<'a>(p: Box<Point>) -> &'a isize {
14    |        ^^
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0597`.