rust/src/test/ui/span/borrowck-ref-into-rvalue.stderr

17 lines
503 B
Plaintext
Raw Normal View History

2017-05-27 12:58:52 -05:00
error[E0597]: borrowed value does not live long enough
--> $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
error: aborting due to previous error(s)