]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/reference-carried-through-struct-field.ast.stderr
Update upstream source from tag 'upstream/1.31.0_beta.4+dfsg1'
[rustc.git] / src / test / ui / nll / reference-carried-through-struct-field.ast.stderr
1 error[E0506]: cannot assign to `x` because it is borrowed
2 --> $DIR/reference-carried-through-struct-field.rs:21:5
3 |
4 LL | let wrapper = Wrap { w: &mut x };
5 | - borrow of `x` occurs here
6 LL | x += 1; //[ast]~ ERROR cannot assign to `x` because it is borrowed [E0506]
7 | ^^^^^^ assignment to borrowed `x` occurs here
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0506`.