]>
Commit | Line | Data |
---|---|---|
9fa01778 | 1 | error[E0515]: cannot return value referencing local variable `z` |
48663c56 | 2 | --> $DIR/issue-48697.rs:7:5 |
9fa01778 XL |
3 | | |
4 | LL | let k = f(&z); | |
5 | | -- `z` is borrowed here | |
532ac7d7 | 6 | LL | f(x) |
9fa01778 XL |
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`. |