about summary refs log tree commit diff
path: root/src/test/ui/span/borrowck-object-mutability.nll.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/span/borrowck-object-mutability.nll.stderr')
-rw-r--r--src/test/ui/span/borrowck-object-mutability.nll.stderr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/span/borrowck-object-mutability.nll.stderr b/src/test/ui/span/borrowck-object-mutability.nll.stderr
index b318e778f87..3f0eb97c7af 100644
--- a/src/test/ui/span/borrowck-object-mutability.nll.stderr
+++ b/src/test/ui/span/borrowck-object-mutability.nll.stderr
@@ -1,4 +1,4 @@
-error[E0596]: cannot borrow immutable item `*x` as mutable
+error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
   --> $DIR/borrowck-object-mutability.rs:19:5
    |
 LL | fn borrowed_receiver(x: &Foo) {
@@ -7,7 +7,7 @@ LL |     x.borrowed();
 LL |     x.borrowed_mut(); //~ ERROR cannot borrow
    |     ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
 
-error[E0596]: cannot borrow immutable item `*x` as mutable
+error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable
   --> $DIR/borrowck-object-mutability.rs:29:5
    |
 LL | fn owned_receiver(x: Box<Foo>) {