]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/two-phase-baseline.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / two-phase-baseline.rs
1 // run-pass
2
3 // This is the "goto example" for why we want two phase borrows.
4
5 fn main() {
6     let mut v = vec![0, 1, 2];
7     v.push(v.len());
8     assert_eq!(v, [0, 1, 2, 3]);
9 }