summaryrefslogtreecommitdiffstats
path: root/src/test/ui/static/refer-to-other-statics-by-value.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/static/refer-to-other-statics-by-value.rs')
-rw-r--r--src/test/ui/static/refer-to-other-statics-by-value.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/static/refer-to-other-statics-by-value.rs b/src/test/ui/static/refer-to-other-statics-by-value.rs
new file mode 100644
index 000000000..90f1980f8
--- /dev/null
+++ b/src/test/ui/static/refer-to-other-statics-by-value.rs
@@ -0,0 +1,8 @@
+// run-pass
+
+static A: usize = 42;
+static B: usize = A;
+
+fn main() {
+ assert_eq!(B, 42);
+}