2018-10-14 15:12:02 +01:00
|
|
|
error[E0515]: cannot return value referencing temporary value
|
2019-04-07 16:07:36 +01:00
|
|
|
--> $DIR/return-ref-mut-issue-46557.rs:5:5
|
2018-01-11 18:08:28 -05:00
|
|
|
|
|
2018-10-14 15:12:02 +01:00
|
|
|
LL | let ref mut x = 1234543;
|
|
|
|
| ------- temporary value created here
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | x
|
2018-10-14 15:12:02 +01:00
|
|
|
| ^ returns a value referencing data owned by the current function
|
2018-01-11 18:08:28 -05:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-01-11 18:08:28 -05:00
|
|
|
|
2018-10-14 15:12:02 +01:00
|
|
|
For more information about this error, try `rustc --explain E0515`.
|