about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorOliver Schneider <git-no-reply-9879165716479413131@oli-obk.de>2018-03-30 12:31:48 +0200
committerOliver Schneider <git-no-reply-9879165716479413131@oli-obk.de>2018-03-30 12:31:48 +0200
commit70c10f1f144eb9012dabc10123ea128e5cbc9e3b (patch)
treea74913e14b49f248129aa13dc35066b27c7f40f4 /src/test
parent361509320c882ee76f0d1359f842dec4637e6b08 (diff)
downloadrust-70c10f1f144eb9012dabc10123ea128e5cbc9e3b.tar.gz
rust-70c10f1f144eb9012dabc10123ea128e5cbc9e3b.zip
Introduce an edge from a const eval to the MIR of all statics it depends on
Diffstat (limited to 'src/test')
-rw-r--r--src/test/incremental/static_refering_to_other_static2/issue.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/incremental/static_refering_to_other_static2/issue.rs b/src/test/incremental/static_refering_to_other_static2/issue.rs
new file mode 100644
index 00000000000..55847866895
--- /dev/null
+++ b/src/test/incremental/static_refering_to_other_static2/issue.rs
@@ -0,0 +1,20 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// revisions:rpass1 rpass2
+
+#[cfg(rpass1)]
+pub static A: i32 = 42;
+#[cfg(rpass2)]
+pub static A: i32 = 43;
+
+pub static B: &i32 = &A;
+
+fn main() {}