about summary refs log tree commit diff
path: root/src/test/compile-fail/empty-struct-unit-expr.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-01-14 14:26:50 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-01-15 19:57:53 +0300
commitccb4b35897c0356bb397fe045fa23ddbce9fc134 (patch)
tree395778e0f9f1e96f92593c4021d08b5c77bab9fe /src/test/compile-fail/empty-struct-unit-expr.rs
parent1f4e317e45349eb2d3c853e96bfd24dd574b36d1 (diff)
downloadrust-ccb4b35897c0356bb397fe045fa23ddbce9fc134.tar.gz
rust-ccb4b35897c0356bb397fe045fa23ddbce9fc134.zip
Preserve struct/variant kinds in metadata
Add tests for use of empty structs in cross-crate scenarios
Diffstat (limited to 'src/test/compile-fail/empty-struct-unit-expr.rs')
-rw-r--r--src/test/compile-fail/empty-struct-unit-expr.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/test/compile-fail/empty-struct-unit-expr.rs b/src/test/compile-fail/empty-struct-unit-expr.rs
index 199065665b9..822ee9e0dbc 100644
--- a/src/test/compile-fail/empty-struct-unit-expr.rs
+++ b/src/test/compile-fail/empty-struct-unit-expr.rs
@@ -10,15 +10,22 @@
 
 // Can't use unit struct as constructor function
 
+// aux-build:empty-struct.rs
+
 #![feature(braced_empty_structs)]
 
-struct Empty1;
+extern crate empty_struct;
+use empty_struct::*;
+
+struct Empty2;
 
 enum E {
-    Empty2
+    Empty4
 }
 
 fn main() {
-    let e1 = Empty1(); //~ ERROR expected function, found `Empty1`
-    let e2 = E::Empty2(); //~ ERROR expected function, found `E`
+    let e2 = Empty2(); //~ ERROR expected function, found `Empty2`
+    let e4 = E::Empty4(); //~ ERROR expected function, found `E`
+    let xe2 = XEmpty2(); //~ ERROR expected function, found `empty_struct::XEmpty2`
+    let xe4 = XE::XEmpty4(); //~ ERROR  expected function, found `empty_struct::XE`
 }