]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/two-phase-baseline.rs
Auto merge of #95474 - oli-obk:tait_ub, r=jackh726
[rust.git] / src / test / 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 }