]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/issue-57989.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / nll / issue-57989.rs
CommitLineData
0731742a
XL
1// Test for ICE from issue 57989
2
0731742a
XL
3fn f(x: &i32) {
4 let g = &x;
136023e0 5 *x = 0; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
0731742a
XL
6 //~| ERROR cannot assign to `*x` because it is borrowed
7 g;
8}
9
10fn main() {}