2019-01-17 20:03:58 +00:00
|
|
|
error[E0515]: cannot return value referencing local variable `z`
|
2019-04-07 16:07:36 +01:00
|
|
|
--> $DIR/promoted-closure-pair.rs:7:5
|
2019-01-17 20:03:58 +00:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | p.1(&z)
|
2019-01-17 20:03:58 +00:00
|
|
|
| ^^^^--^
|
|
|
|
| | |
|
|
|
|
| | `z` is borrowed here
|
|
|
|
| returns a value referencing data owned by the current function
|
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2019-01-17 20:03:58 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0515`.
|