diff --git a/mk/tests.mk b/mk/tests.mk index cd5e85cf34f20..85c63acb0f1f2 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -183,8 +183,8 @@ check-test: cleantestlibs cleantmptestlogs all check-stage2-rfail $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log check-lite: cleantestlibs cleantmptestlogs \ - check-stage2-std check-stage2-extra check-stage2-rpass \ - check-stage2-rustuv check-stage2-native check-stage2-green \ + $(foreach crate,$(TARGET_CRATES),check-stage2-$(crate)) \ + check-stage2-rpass \ check-stage2-rfail check-stage2-cfail check-stage2-rmake $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log @@ -861,7 +861,8 @@ $(foreach host,$(CFG_HOST), \ $(eval $(foreach target,$(CFG_TARGET), \ $(eval $(call DEF_CHECK_FAST_FOR_T_H,,$(target),$(host)))))) -check-fast: tidy check-fast-H-$(CFG_BUILD) check-stage2-std check-stage2-extra +check-fast: tidy check-fast-H-$(CFG_BUILD) \ + $(foreach crate,$(TARGET_CRATES),check-stage2-$(crate)) $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log define DEF_CHECK_FAST_FOR_H diff --git a/src/test/auxiliary/issue-5521.rs b/src/test/auxiliary/issue-5521.rs new file mode 100644 index 0000000000000..951e94e47c549 --- /dev/null +++ b/src/test/auxiliary/issue-5521.rs @@ -0,0 +1,15 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[feature(managed_boxes)]; + +use std::hashmap::HashMap; + +pub type map = @HashMap; diff --git a/src/test/compile-fail/struct-no-fields-2.rs b/src/test/compile-fail/struct-no-fields-2.rs index b6a40a0e8e976..63e38e35447b2 100644 --- a/src/test/compile-fail/struct-no-fields-2.rs +++ b/src/test/compile-fail/struct-no-fields-2.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern: Unit-like struct construction is written with no trailing `{ }` struct Foo; fn f2() { let _end_stmt = Foo { }; + //~^ ERROR: Unit-like struct construction is written with no trailing `{ }` } fn main() {} diff --git a/src/test/compile-fail/struct-no-fields-3.rs b/src/test/compile-fail/struct-no-fields-3.rs index b6845ce729208..33077d4f1b3ff 100644 --- a/src/test/compile-fail/struct-no-fields-3.rs +++ b/src/test/compile-fail/struct-no-fields-3.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern: Unit-like struct construction is written with no trailing `{ }` struct Foo; fn g3() { let _mid_tuple = (Foo { }, 2); + //~^ ERROR: Unit-like struct construction is written with no trailing `{ }` } fn main() {} diff --git a/src/test/compile-fail/struct-no-fields-4.rs b/src/test/compile-fail/struct-no-fields-4.rs index 0bd3c8d58553d..6b73cb769ee30 100644 --- a/src/test/compile-fail/struct-no-fields-4.rs +++ b/src/test/compile-fail/struct-no-fields-4.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern: Unit-like struct construction is written with no trailing `{ }` struct Foo; fn h4() { let _end_of_tuple = (3, Foo { }); + //~^ ERROR: Unit-like struct construction is written with no trailing `{ }` } fn main() {} diff --git a/src/test/compile-fail/struct-no-fields-5.rs b/src/test/compile-fail/struct-no-fields-5.rs index 1af72ff6d78d9..81c050e61cb07 100644 --- a/src/test/compile-fail/struct-no-fields-5.rs +++ b/src/test/compile-fail/struct-no-fields-5.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern: Unit-like struct construction is written with no trailing `{ }` struct Foo; fn i5() { let _end_of_block = { Foo { } }; + //~^ ERROR: Unit-like struct construction is written with no trailing `{ }` } fn main() {} diff --git a/src/test/compile-fail/struct-no-fields.rs b/src/test/compile-fail/struct-no-fields.rs index 5053b842e65ba..6142ec0653cce 100644 --- a/src/test/compile-fail/struct-no-fields.rs +++ b/src/test/compile-fail/struct-no-fields.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern: Unit-like struct definition should be written as `struct Foo;` struct Foo {} +//~^ ERROR: Unit-like struct definition should be written as `struct Foo;` fn main() {} diff --git a/src/test/run-pass/issue-10714.rs b/src/test/run-pass/issue-10714.rs new file mode 100644 index 0000000000000..d369546317eac --- /dev/null +++ b/src/test/run-pass/issue-10714.rs @@ -0,0 +1,14 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +enum v {} +pub fn main() { + let y: v = unsafe { ::std::unstable::intrinsics::uninit() }; +} diff --git a/src/test/run-pass/issue-5521.rs b/src/test/run-pass/issue-5521.rs new file mode 100644 index 0000000000000..d3ba893b84146 --- /dev/null +++ b/src/test/run-pass/issue-5521.rs @@ -0,0 +1,26 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:issue-5521.rs +// xfail-fast + +#[feature(managed_boxes)]; + +extern mod foo = "issue-5521"; + +fn foo(a: foo::map) { + if false { + fail!(); + } else { + let _b = a.get(&2); + } +} + +fn main() {} diff --git a/src/test/run-pass/issue-9396.rs b/src/test/run-pass/issue-9396.rs new file mode 100644 index 0000000000000..5ddcec3676dac --- /dev/null +++ b/src/test/run-pass/issue-9396.rs @@ -0,0 +1,28 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::comm; +use std::io::timer::Timer; + +pub fn main() { + let (port, chan) = Chan::new(); + spawn(proc (){ + let mut timer = Timer::new().unwrap(); + timer.sleep(10); + chan.send(()); + }); + loop { + match port.try_recv() { + comm::Data(()) => break, + comm::Empty => {} + comm::Disconnected => unreachable!() + } + } +}