]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-48697.stderr
Rollup merge of #105216 - GuillaumeGomez:rm-unused-gui-test, r=notriddle
[rust.git] / src / test / ui / nll / issue-48697.stderr
1 error[E0515]: cannot return value referencing local variable `z`
2   --> $DIR/issue-48697.rs:7:5
3    |
4 LL |     let k = f(&z);
5    |               -- `z` is borrowed here
6 LL |     f(x)
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`.