2019-01-17 14:03:58 -06:00
|
|
|
error[E0515]: cannot return value referencing local variable `z`
|
|
|
|
--> $DIR/issue-48697.rs:9:5
|
|
|
|
|
|
|
|
|
LL | let k = f(&z);
|
|
|
|
| -- `z` is borrowed here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | f(x)
|
2019-01-17 14:03:58 -06:00
|
|
|
| ^^^^ returns a value referencing data owned by the current function
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0515`.
|