about summary refs log tree commit diff
path: root/tests/ui/confuse-field-and-method/private-field.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/confuse-field-and-method/private-field.stderr')
-rw-r--r--tests/ui/confuse-field-and-method/private-field.stderr12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/confuse-field-and-method/private-field.stderr b/tests/ui/confuse-field-and-method/private-field.stderr
new file mode 100644
index 00000000000..783378f8db5
--- /dev/null
+++ b/tests/ui/confuse-field-and-method/private-field.stderr
@@ -0,0 +1,12 @@
+error[E0599]: no method named `dog_age` found for struct `Dog` in the current scope
+  --> $DIR/private-field.rs:16:23
+   |
+LL |     pub struct Dog {
+   |     -------------- method `dog_age` not found for this struct
+...
+LL |     let dog_age = dog.dog_age();
+   |                       ^^^^^^^ private field, not a method
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.