]> git.lizzy.rs Git - rust.git/blob - src/test/ui/return-disjoint-regions.stderr
Rollup merge of #101388 - compiler-errors:issue-101376, r=fee1-dead
[rust.git] / src / test / ui / return-disjoint-regions.stderr
1 error[E0515]: cannot return value referencing function parameter `x`
2   --> $DIR/return-disjoint-regions.rs:4:5
3    |
4 LL |     let y = &x;
5    |             -- `x` is borrowed here
6 LL |     (y, y)
7    |     ^^^^^^ returns a value referencing data owned by the current function
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0515`.