summaryrefslogtreecommitdiffstats
path: root/src/test/ui/inner-static.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/inner-static.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/inner-static.rs b/src/test/ui/inner-static.rs
new file mode 100644
index 000000000..adba299eb
--- /dev/null
+++ b/src/test/ui/inner-static.rs
@@ -0,0 +1,14 @@
+// run-pass
+// aux-build:inner_static.rs
+
+
+extern crate inner_static;
+
+pub fn main() {
+ let a = inner_static::A::<()> { v: () };
+ let b = inner_static::B::<()> { v: () };
+ let c = inner_static::test::A::<()> { v: () };
+ assert_eq!(a.bar(), 2);
+ assert_eq!(b.bar(), 4);
+ assert_eq!(c.bar(), 6);
+}