]> git.lizzy.rs Git - rust.git/blob - src/test/ui/E0506.mir.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / E0506.mir.stderr
1 error[E0506]: cannot assign to `fancy_num` because it is borrowed
2   --> $DIR/E0506.rs:21:5
3    |
4 LL |     let fancy_ref = &fancy_num;
5    |                     ---------- borrow of `fancy_num` occurs here
6 LL |     fancy_num = FancyNum { num: 6 }; //[ast]~ ERROR E0506
7    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `fancy_num` occurs here
8 ...
9 LL |     println!("Num: {}, Ref: {}", fancy_num.num, fancy_ref.num);
10    |                                                 ------------- borrow later used here
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0506`.