about summary refs log tree commit diff
path: root/tests/ui/error-codes/E0616.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0616.rs')
-rw-r--r--tests/ui/error-codes/E0616.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0616.rs b/tests/ui/error-codes/E0616.rs
new file mode 100644
index 00000000000..98f87a83bc5
--- /dev/null
+++ b/tests/ui/error-codes/E0616.rs
@@ -0,0 +1,14 @@
+mod a {
+    pub struct Foo {
+        x: u32,
+    }
+
+    impl Foo {
+        pub fn new() -> Foo { Foo { x: 0 } }
+    }
+}
+
+fn main() {
+    let f = a::Foo::new();
+    f.x; //~ ERROR E0616
+}