]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr
Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
[rust.git] / src / test / ui / regions / regions-infer-borrow-scope-too-big.stderr
1 error[E0515]: cannot return value referencing local data `*p`
2   --> $DIR/regions-infer-borrow-scope-too-big.rs:13:12
3    |
4 LL |     let xc = x_coord(&*p);
5    |                      --- `*p` is borrowed here
6 LL |     assert_eq!(*xc, 3);
7 LL |     return xc;
8    |            ^^ returns a value referencing data owned by the current function
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0515`.