]>
git.proxmox.com Git - rustc.git/blob - tests/ui/borrowck/borrowck-pat-reassign-binding.rs
2 let mut x
: Option
<isize> = None
;
5 // Note: on this branch, no borrow has occurred.
9 // But on this branch, `i` is an outstanding borrow
10 x
= Some(*i
+1); //~ ERROR cannot assign to `x` because it is borrowed
14 x
.clone(); // just to prevent liveness warnings