summaryrefslogtreecommitdiffstats
path: root/tests/incremental/krate_reassign_34991
diff options
context:
space:
mode:
Diffstat (limited to 'tests/incremental/krate_reassign_34991')
-rw-r--r--tests/incremental/krate_reassign_34991/auxiliary/a.rs3
-rw-r--r--tests/incremental/krate_reassign_34991/main.rs20
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/incremental/krate_reassign_34991/auxiliary/a.rs b/tests/incremental/krate_reassign_34991/auxiliary/a.rs
new file mode 100644
index 000000000..69be8d3bc
--- /dev/null
+++ b/tests/incremental/krate_reassign_34991/auxiliary/a.rs
@@ -0,0 +1,3 @@
+#![crate_type="rlib"]
+
+pub type X = u32;
diff --git a/tests/incremental/krate_reassign_34991/main.rs b/tests/incremental/krate_reassign_34991/main.rs
new file mode 100644
index 000000000..c4ae19ac9
--- /dev/null
+++ b/tests/incremental/krate_reassign_34991/main.rs
@@ -0,0 +1,20 @@
+// aux-build:a.rs
+// revisions:rpass1 rpass2
+
+#![feature(rustc_attrs)]
+
+#[cfg(rpass1)]
+extern crate a;
+
+#[cfg(rpass1)]
+pub fn use_X() -> u32 {
+ let x: a::X = 22;
+ x as u32
+}
+
+#[cfg(rpass2)]
+pub fn use_X() -> u32 {
+ 22
+}
+
+pub fn main() { }