diff options
Diffstat (limited to 'tests/incremental/remove_crate')
-rw-r--r-- | tests/incremental/remove_crate/auxiliary/extern_crate.rs | 3 | ||||
-rw-r--r-- | tests/incremental/remove_crate/main.rs | 24 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/incremental/remove_crate/auxiliary/extern_crate.rs b/tests/incremental/remove_crate/auxiliary/extern_crate.rs new file mode 100644 index 000000000..1cafdf49d --- /dev/null +++ b/tests/incremental/remove_crate/auxiliary/extern_crate.rs @@ -0,0 +1,3 @@ +pub fn foo(_: u8) { + +} diff --git a/tests/incremental/remove_crate/main.rs b/tests/incremental/remove_crate/main.rs new file mode 100644 index 000000000..14b80df0d --- /dev/null +++ b/tests/incremental/remove_crate/main.rs @@ -0,0 +1,24 @@ +// 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) { + +} |