mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
21 lines
784 B
Text
21 lines
784 B
Text
error[E0515]: cannot return reference to temporary value
|
|
--> $DIR/regions-creating-enums.rs:23:16
|
|
|
|
|
LL | return &Ast::Num((*f)(x));
|
|
| ^-----------------
|
|
| ||
|
|
| |temporary value created here
|
|
| returns a reference to data owned by the current function
|
|
|
|
error[E0515]: cannot return reference to temporary value
|
|
--> $DIR/regions-creating-enums.rs:28:16
|
|
|
|
|
LL | return &Ast::Add(m_x, m_y);
|
|
| ^------------------
|
|
| ||
|
|
| |temporary value created here
|
|
| returns a reference to data owned by the current function
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0515`.
|