diff options
Diffstat (limited to 'tests/run-make-fulldeps/emit')
-rw-r--r-- | tests/run-make-fulldeps/emit/Makefile | 21 | ||||
-rw-r--r-- | tests/run-make-fulldeps/emit/test-24876.rs | 9 | ||||
-rw-r--r-- | tests/run-make-fulldeps/emit/test-26235.rs | 46 |
3 files changed, 0 insertions, 76 deletions
diff --git a/tests/run-make-fulldeps/emit/Makefile b/tests/run-make-fulldeps/emit/Makefile deleted file mode 100644 index 78e68bd61..000000000 --- a/tests/run-make-fulldeps/emit/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -include ../tools.mk - -all: - $(RUSTC) -Copt-level=0 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs - $(RUSTC) -Copt-level=1 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs - $(RUSTC) -Copt-level=2 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs - $(RUSTC) -Copt-level=3 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs - $(RUSTC) -Copt-level=s --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs - $(RUSTC) -Copt-level=z --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs - $(RUSTC) -Copt-level=0 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs - $(call RUN,test-26235) || exit 1 - $(RUSTC) -Copt-level=1 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs - $(call RUN,test-26235) || exit 1 - $(RUSTC) -Copt-level=2 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs - $(call RUN,test-26235) || exit 1 - $(RUSTC) -Copt-level=3 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs - $(call RUN,test-26235) || exit 1 - $(RUSTC) -Copt-level=s --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs - $(call RUN,test-26235) || exit 1 - $(RUSTC) -Copt-level=z --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs - $(call RUN,test-26235) || exit 1 diff --git a/tests/run-make-fulldeps/emit/test-24876.rs b/tests/run-make-fulldeps/emit/test-24876.rs deleted file mode 100644 index 734e2ee4b..000000000 --- a/tests/run-make-fulldeps/emit/test-24876.rs +++ /dev/null @@ -1,9 +0,0 @@ -// Checks for issue #24876 - -fn main() { - let mut v = 0; - for i in 0..0 { - v += i; - } - println!("{}", v) -} diff --git a/tests/run-make-fulldeps/emit/test-26235.rs b/tests/run-make-fulldeps/emit/test-26235.rs deleted file mode 100644 index 07d975f33..000000000 --- a/tests/run-make-fulldeps/emit/test-26235.rs +++ /dev/null @@ -1,46 +0,0 @@ -// Checks for issue #26235 - -fn main() { - use std::thread; - - type Key = u32; - const NUM_THREADS: usize = 2; - - #[derive(Clone,Copy)] - struct Stats<S> { - upsert: S, - delete: S, - insert: S, - update: S - }; - - impl<S> Stats<S> where S: Copy { - fn dot<B, F, T>(self, s: Stats<T>, f: F) -> Stats<B> where F: Fn(S, T) -> B { - let Stats { upsert: u1, delete: d1, insert: i1, update: p1 } = self; - let Stats { upsert: u2, delete: d2, insert: i2, update: p2 } = s; - Stats { upsert: f(u1, u2), delete: f(d1, d2), insert: f(i1, i2), update: f(p1, p2) } - } - - fn new(init: S) -> Self { - Stats { upsert: init, delete: init, insert: init, update: init } - } - } - - fn make_threads() -> Vec<thread::JoinHandle<()>> { - let mut t = Vec::with_capacity(NUM_THREADS); - for _ in 0..NUM_THREADS { - t.push(thread::spawn(move || {})); - } - t - } - - let stats = [Stats::new(0); NUM_THREADS]; - make_threads(); - - { - let Stats { ref upsert, ref delete, ref insert, ref update } = stats.iter().fold( - Stats::new(0), |res, &s| res.dot(s, |x: Key, y: Key| x.wrapping_add(y))); - println!("upserts: {}, deletes: {}, inserts: {}, updates: {}", - upsert, delete, insert, update); - } -} |