os-rust/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.ast.nll.stderr

10 lines
311 B
Text
Raw Normal View History

error[E0515]: cannot return reference to function parameter `x`
2018-12-25 08:56:47 -07:00
--> $DIR/borrowck-local-borrow-outlives-fn.rs:5:5
2018-08-08 14:28:26 +02:00
|
LL | &x
| ^^ returns a reference to data owned by the current function
2018-08-08 14:28:26 +02:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0515`.