summaryrefslogtreecommitdiffstats
path: root/tests/incremental/static_refering_to_other_static3
diff options
context:
space:
mode:
Diffstat (limited to 'tests/incremental/static_refering_to_other_static3')
-rw-r--r--tests/incremental/static_refering_to_other_static3/issue.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/incremental/static_refering_to_other_static3/issue.rs b/tests/incremental/static_refering_to_other_static3/issue.rs
new file mode 100644
index 000000000..80999813d
--- /dev/null
+++ b/tests/incremental/static_refering_to_other_static3/issue.rs
@@ -0,0 +1,15 @@
+// revisions:rpass1 rpass2
+
+#[cfg(rpass1)]
+pub static A: u8 = 42;
+#[cfg(rpass2)]
+pub static A: u8 = 43;
+
+static B: &u8 = &C.1;
+static C: (&&u8, u8) = (&B, A);
+
+fn main() {
+ assert_eq!(*B, A);
+ assert_eq!(**C.0, A);
+ assert_eq!(C.1, A);
+}