diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-40288.stderr | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-40288.stderr b/src/test/ui/issues/issue-40288.stderr new file mode 100644 index 000000000..fb4ecab36 --- /dev/null +++ b/src/test/ui/issues/issue-40288.stderr @@ -0,0 +1,15 @@ +error[E0506]: cannot assign to `*refr` because it is borrowed + --> $DIR/issue-40288.rs:16:5 + | +LL | save_ref(&*refr, &mut out); + | ------ borrow of `*refr` occurs here +... +LL | *refr = 3; + | ^^^^^^^^^ assignment to borrowed `*refr` occurs here +... +LL | println!("{:?}", out[0]); + | ------ borrow later used here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0506`. |