]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-57989.rs
Auto merge of #105145 - Ayush1325:sequential-remote-server, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / issue-57989.rs
1 // Test for ICE from issue 57989
2
3 fn f(x: &i32) {
4     let g = &x;
5     *x = 0;     //~ ERROR cannot assign to `*x`, which is behind a `&` reference
6                 //~| ERROR cannot assign to `*x` because it is borrowed
7     g;
8 }
9
10 fn main() {}