1 // This is the first counter-example from Niko's blog post
2 // smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/
3 // of a danger for code to crash if we just turned off the check for whether
4 // a mutable-borrow aliases another borrow.
7 let mut v: Vec<String> = vec![format!("Hello, ")];
10 v.push(format!("foo"));
11 //~^ ERROR cannot borrow `v` as mutable more than once at a time [E0499]