summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mut/mut-cant-alias.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/mut/mut-cant-alias.stderr13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/mut/mut-cant-alias.stderr b/src/test/ui/mut/mut-cant-alias.stderr
new file mode 100644
index 000000000..6046c076f
--- /dev/null
+++ b/src/test/ui/mut/mut-cant-alias.stderr
@@ -0,0 +1,13 @@
+error[E0499]: cannot borrow `b` as mutable more than once at a time
+ --> $DIR/mut-cant-alias.rs:9:20
+ |
+LL | let b1 = &mut *b;
+ | - first mutable borrow occurs here
+LL | let b2 = &mut *b;
+ | ^ second mutable borrow occurs here
+LL | b1.use_mut();
+ | ------------ first borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0499`.