]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr
Rollup merge of #102270 - Nilstrieb:delete-useless-benches, r=TaKO8Ki
[rust.git] / src / test / ui / borrowck / borrowck-return-variable-on-stack-via-clone.stderr
1 error[E0515]: cannot return value referencing function parameter `x`
2   --> $DIR/borrowck-return-variable-on-stack-via-clone.rs:7:5
3    |
4 LL |     (&x).clone()
5    |     ----^^^^^^^^
6    |     |
7    |     returns a value referencing data owned by the current function
8    |     `x` is borrowed here
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0515`.