summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0609.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0609.rs')
-rw-r--r--tests/ui/error-codes/E0609.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0609.rs b/tests/ui/error-codes/E0609.rs
new file mode 100644
index 000000000..e3a97f2fb
--- /dev/null
+++ b/tests/ui/error-codes/E0609.rs
@@ -0,0 +1,12 @@
+struct Foo {
+ x: u32,
+}
+struct Bar;
+
+fn main() {
+ let x = Foo { x: 0 };
+ let _ = x.foo; //~ ERROR E0609
+
+ let y = Bar;
+ y.1; //~ ERROR E0609
+}