2014-07-01 11:47:21 -07:00
|
|
|
fn main() {
|
|
|
|
let a = "".to_string();
|
2015-01-26 21:21:15 -05:00
|
|
|
let b: Vec<&str> = a.lines().collect();
|
2014-07-01 11:47:21 -07:00
|
|
|
drop(a); //~ ERROR cannot move out of `a` because it is borrowed
|
2015-01-31 12:20:46 -05:00
|
|
|
for s in &b {
|
2014-07-01 11:47:21 -07:00
|
|
|
println!("{}", *s);
|
|
|
|
}
|
|
|
|
}
|