2018-09-23 10:19:00 -05:00
|
|
|
error[E0597]: borrowed value does not live long enough
|
|
|
|
--> $DIR/borrowck-ref-into-rvalue.rs:13:11
|
2018-04-10 17:38:35 -05:00
|
|
|
|
|
2018-09-23 10:19:00 -05:00
|
|
|
LL | match Some("Hello".to_string()) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
|
2018-04-10 17:38:35 -05:00
|
|
|
...
|
|
|
|
LL | }
|
2018-09-23 10:19:00 -05:00
|
|
|
| - temporary value only lives until here
|
2018-04-10 17:38:35 -05:00
|
|
|
LL | println!("{}", *msg);
|
|
|
|
| ---- borrow later used here
|
2018-09-09 13:43:46 -05:00
|
|
|
|
|
|
|
|
= note: consider using a `let` binding to create a longer lived value
|
2018-04-10 17:38:35 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-09-23 10:19:00 -05:00
|
|
|
For more information about this error, try `rustc --explain E0597`.
|