2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: borrowed value does not live long enough
|
2016-10-26 11:10:39 -05:00
|
|
|
--> $DIR/borrowck-ref-into-rvalue.rs:18:5
|
|
|
|
|
|
|
|
|
14 | Some(ref m) => { //~ ERROR borrowed value does not live long enough
|
|
|
|
| ----- borrow occurs here
|
|
|
|
...
|
|
|
|
18 | }
|
|
|
|
| ^ borrowed value dropped here while still borrowed
|
|
|
|
19 | println!("{}", *msg);
|
|
|
|
20 | }
|
|
|
|
| - borrowed value needs to live until here
|
|
|
|
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
|
2017-05-22 06:46:05 -05:00
|
|
|
error: aborting due to previous error(s)
|
2016-10-26 11:10:39 -05:00
|
|
|
|