summaryrefslogtreecommitdiffstats
path: root/src/test/incremental/spike.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/incremental/spike.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/incremental/spike.rs')
-rw-r--r--src/test/incremental/spike.rs49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/test/incremental/spike.rs b/src/test/incremental/spike.rs
deleted file mode 100644
index a6a05e7c3..000000000
--- a/src/test/incremental/spike.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-// A first "spike" for incremental compilation: here, we change the
-// content of the `make` function, and we find that we can reuse the
-// `y` module entirely (but not the `x` module).
-
-// revisions:rpass1 rpass2
-// compile-flags: -Z query-dep-graph
-
-#![feature(rustc_attrs)]
-
-#![rustc_partition_reused(module="spike", cfg="rpass2")]
-#![rustc_partition_codegened(module="spike-x", cfg="rpass2")]
-#![rustc_partition_reused(module="spike-y", cfg="rpass2")]
-
-mod x {
- pub struct X {
- x: u32, y: u32,
- }
-
- #[cfg(rpass1)]
- fn make() -> X {
- X { x: 22, y: 0 }
- }
-
- #[cfg(rpass2)]
- fn make() -> X {
- X { x: 11, y: 11 }
- }
-
- pub fn new() -> X {
- make()
- }
-
- pub fn sum(x: &X) -> u32 {
- x.x + x.y
- }
-}
-
-mod y {
- use x;
-
- pub fn assert_sum() -> bool {
- let x = x::new();
- x::sum(&x) == 22
- }
-}
-
-pub fn main() {
- y::assert_sum();
-}