]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-mut-addr-of-imm-var.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / borrowck / borrowck-mut-addr-of-imm-var.rs
1 fn main() {
2     let x: isize = 3;
3     let y: &mut isize = &mut x; //~ ERROR cannot borrow
4     *y = 5;
5     println!("{}", *y);
6 }