fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1error[E0515]: cannot return reference to temporary value 2 --> $DIR/regions-creating-enums.rs:23:16 3 | 4LL | return &Ast::Num((*f)(x)); 5 | ^----------------- 6 | || 7 | |temporary value created here 8 | returns a reference to data owned by the current function 9 10error[E0515]: cannot return reference to temporary value 11 --> $DIR/regions-creating-enums.rs:28:16 12 | 13LL | return &Ast::Add(m_x, m_y); 14 | ^------------------ 15 | || 16 | |temporary value created here 17 | returns a reference to data owned by the current function 18 19error: aborting due to 2 previous errors 20 21For more information about this error, try `rustc --explain E0515`.