about summary refs log tree commit diff
path: root/src/test/ui/compile-fail-migration/mutable-class-fields.ast.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/compile-fail-migration/mutable-class-fields.ast.stderr')
-rw-r--r--src/test/ui/compile-fail-migration/mutable-class-fields.ast.stderr11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/compile-fail-migration/mutable-class-fields.ast.stderr b/src/test/ui/compile-fail-migration/mutable-class-fields.ast.stderr
new file mode 100644
index 00000000000..0a4d3a0e968
--- /dev/null
+++ b/src/test/ui/compile-fail-migration/mutable-class-fields.ast.stderr
@@ -0,0 +1,11 @@
+error[E0594]: cannot assign to field `nyan.how_hungry` of immutable binding
+  --> $DIR/mutable-class-fields.rs:28:3
+   |
+LL |   let nyan : cat = cat(52, 99);
+   |       ---- consider changing this to `mut nyan`
+LL |   nyan.how_hungry = 0; //[ast]~ ERROR cannot assign
+   |   ^^^^^^^^^^^^^^^^^^^ cannot mutably borrow field of immutable binding
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0594`.