]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/immut-function-arguments.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / immut-function-arguments.rs
1 fn f(y: Box<isize>) {
2     *y = 5; //~ ERROR cannot assign
3 }
4
5 fn g() {
6     let _frob = |q: Box<isize>| { *q = 2; }; //~ ERROR cannot assign
7 }
8
9 fn main() {}