2017-04-27 15:26:12 -05:00
|
|
|
// Check that we do not suggest `ref f` here in the `main()` function.
|
2017-04-14 23:04:37 -05:00
|
|
|
struct Foo {
|
|
|
|
pub v: Vec<String>,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut f = Foo { v: Vec::new() };
|
|
|
|
f.v.push("hello".to_string());
|
2019-04-22 02:40:08 -05:00
|
|
|
let e = f.v[0]; //~ ERROR cannot move out of borrowed content
|
2017-04-14 23:04:37 -05:00
|
|
|
}
|