about summary refs log tree commit diff
path: root/src/test/incremental
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-11-14 05:30:34 +0000
committerbors <bors@rust-lang.org>2017-11-14 05:30:34 +0000
commitb5a3ab2e81c837df95a21758b00aeb4e88477b30 (patch)
tree8aaf678b9cc3447716d1ea10eefd7884db2d95a6 /src/test/incremental
parent9b53f0a6620c3451a10573ea5c5a51b4c18088ec (diff)
parent67d2b1b7fd2d0efed9734bcab0f25528b9e37492 (diff)
downloadrust-b5a3ab2e81c837df95a21758b00aeb4e88477b30.tar.gz
rust-b5a3ab2e81c837df95a21758b00aeb4e88477b30.zip
Auto merge of #45915 - michaelwoerister:removed-nodes-in-try-mark-green, r=alexcrichton
incr.comp.: Don't crash in DepGraph::try_mark_green() when encountering a removed input node.

Fixes a small regression that was introduced in #45867.

r? @nikomatsakis
Diffstat (limited to 'src/test/incremental')
-rw-r--r--src/test/incremental/remove_crate/auxiliary/extern_crate.rs13
-rw-r--r--src/test/incremental/remove_crate/main.rs34
2 files changed, 47 insertions, 0 deletions
diff --git a/src/test/incremental/remove_crate/auxiliary/extern_crate.rs b/src/test/incremental/remove_crate/auxiliary/extern_crate.rs
new file mode 100644
index 00000000000..39543cd829d
--- /dev/null
+++ b/src/test/incremental/remove_crate/auxiliary/extern_crate.rs
@@ -0,0 +1,13 @@
+// Copyright 2017 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.
+
+pub fn foo(_: u8) {
+
+}
diff --git a/src/test/incremental/remove_crate/main.rs b/src/test/incremental/remove_crate/main.rs
new file mode 100644
index 00000000000..fafcb8bb0c8
--- /dev/null
+++ b/src/test/incremental/remove_crate/main.rs
@@ -0,0 +1,34 @@
+// Copyright 2014 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.
+
+// Test that removing an upstream crate does not cause any trouble.
+
+// revisions:rpass1 rpass2
+// aux-build:extern_crate.rs
+
+#[cfg(rpass1)]
+extern crate extern_crate;
+
+pub fn main() {
+    #[cfg(rpass1)]
+    {
+        extern_crate::foo(1);
+    }
+
+    #[cfg(rpass2)]
+    {
+        foo(1);
+    }
+}
+
+#[cfg(rpass2)]
+pub fn foo(_: u8) {
+
+}