summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/immut-function-arguments.rs
blob: 242a33e8216d8d9024a2ce4e3d4a837f6821c181 (plain)
1
2
3
4
5
6
7
8
9
fn f(y: Box<isize>) {
    *y = 5; //~ ERROR cannot assign
}

fn g() {
    let _frob = |q: Box<isize>| { *q = 2; }; //~ ERROR cannot assign
}

fn main() {}