diff --git a/src/test/compile-fail/issue-17718-static-sync.rs b/src/test/compile-fail/issue-17718-static-sync.rs index 394a9cc69bee..fa8035a79652 100644 --- a/src/test/compile-fail/issue-17718-static-sync.rs +++ b/src/test/compile-fail/issue-17718-static-sync.rs @@ -8,12 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::marker; +#![feature(optin_builtin_traits)] -struct Foo { marker: marker::NoSync } +use std::marker::Sync; + +struct Foo; +impl !Sync for Foo {} static FOO: usize = 3; -static BAR: Foo = Foo { marker: marker::NoSync }; +static BAR: Foo = Foo; //~^ ERROR: the trait `core::marker::Sync` is not implemented fn main() {} diff --git a/src/test/compile-fail/issue-7013.rs b/src/test/compile-fail/issue-7013.rs index d246e4e54d01..90ecfb6015dc 100644 --- a/src/test/compile-fail/issue-7013.rs +++ b/src/test/compile-fail/issue-7013.rs @@ -35,5 +35,4 @@ struct A { fn main() { let a = A {v: box B{v: None} as Box}; //~^ ERROR the trait `core::marker::Send` is not implemented - //~^^ ERROR the trait `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index 79aec386d9a7..5bc769f8e117 100644 --- a/src/test/compile-fail/kindck-nonsendable-1.rs +++ b/src/test/compile-fail/kindck-nonsendable-1.rs @@ -19,6 +19,5 @@ fn main() { let x = Rc::new(3us); bar(move|| foo(x)); //~^ ERROR `core::marker::Send` is not implemented - //~^^ ERROR `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/marker-no-send.rs b/src/test/compile-fail/marker-no-send.rs index 032718d7e9a1..cd253b2f9e5d 100644 --- a/src/test/compile-fail/marker-no-send.rs +++ b/src/test/compile-fail/marker-no-send.rs @@ -8,6 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-stage1 +// ignore-stage2 +// ignore-stage3 + use std::marker; fn foo(p: P) { } diff --git a/src/test/compile-fail/marker-no-share.rs b/src/test/compile-fail/marker-no-share.rs index b29f7fab2ccf..d86b6a0a674e 100644 --- a/src/test/compile-fail/marker-no-share.rs +++ b/src/test/compile-fail/marker-no-share.rs @@ -8,6 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-stage1 +// ignore-stage2 +// ignore-stage3 + use std::marker; fn foo(p: P) { } diff --git a/src/test/compile-fail/mutable-enum-indirect.rs b/src/test/compile-fail/mutable-enum-indirect.rs index f90bb610d374..1657d602e24c 100644 --- a/src/test/compile-fail/mutable-enum-indirect.rs +++ b/src/test/compile-fail/mutable-enum-indirect.rs @@ -11,13 +11,18 @@ // Tests that an `&` pointer to something inherently mutable is itself // to be considered mutable. -use std::marker; +#![feature(optin_builtin_traits)] -enum Foo { A(marker::NoSync) } +use std::marker::Sync; + +struct NoSync; +impl !Sync for NoSync {} + +enum Foo { A(NoSync) } fn bar(_: T) {} fn main() { - let x = Foo::A(marker::NoSync); + let x = Foo::A(NoSync); bar(&x); //~ ERROR the trait `core::marker::Sync` is not implemented } diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs index 551953af1352..52335ab76bda 100644 --- a/src/test/compile-fail/no-send-res-ports.rs +++ b/src/test/compile-fail/no-send-res-ports.rs @@ -37,7 +37,6 @@ fn main() { Thread::spawn(move|| { //~^ ERROR `core::marker::Send` is not implemented - //~^^ ERROR `core::marker::Send` is not implemented let y = x; println!("{:?}", y); }); diff --git a/src/test/compile-fail/no_send-enum.rs b/src/test/compile-fail/no_send-enum.rs index cf1f13e8bb86..625d51260c4d 100644 --- a/src/test/compile-fail/no_send-enum.rs +++ b/src/test/compile-fail/no_send-enum.rs @@ -8,16 +8,21 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::marker; +#![feature(optin_builtin_traits)] + +use std::marker::Send; + +struct NoSend; +impl !Send for NoSend {} enum Foo { - A(marker::NoSend) + A(NoSend) } fn bar(_: T) {} fn main() { - let x = Foo::A(marker::NoSend); + let x = Foo::A(NoSend); bar(x); //~^ ERROR `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/no_send-rc.rs b/src/test/compile-fail/no_send-rc.rs index 82cc319466a6..d404988bd984 100644 --- a/src/test/compile-fail/no_send-rc.rs +++ b/src/test/compile-fail/no_send-rc.rs @@ -16,5 +16,4 @@ fn main() { let x = Rc::new(5is); bar(x); //~^ ERROR `core::marker::Send` is not implemented - //~^^ ERROR `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/no_send-struct.rs b/src/test/compile-fail/no_send-struct.rs index bef705237872..7f16db0ba947 100644 --- a/src/test/compile-fail/no_send-struct.rs +++ b/src/test/compile-fail/no_send-struct.rs @@ -8,17 +8,20 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::marker; +#![feature(optin_builtin_traits)] + +use std::marker::Send; struct Foo { a: isize, - ns: marker::NoSend } +impl !Send for Foo {} + fn bar(_: T) {} fn main() { - let x = Foo { a: 5, ns: marker::NoSend }; + let x = Foo { a: 5 }; bar(x); //~^ ERROR the trait `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/no_share-enum.rs b/src/test/compile-fail/no_share-enum.rs index 33222eef44e7..9331afdbbb5d 100644 --- a/src/test/compile-fail/no_share-enum.rs +++ b/src/test/compile-fail/no_share-enum.rs @@ -8,14 +8,19 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::marker; +#![feature(optin_builtin_traits)] -enum Foo { A(marker::NoSync) } +use std::marker::Sync; + +struct NoSync; +impl !Sync for NoSync {} + +enum Foo { A(NoSync) } fn bar(_: T) {} fn main() { - let x = Foo::A(marker::NoSync); + let x = Foo::A(NoSync); bar(x); //~^ ERROR the trait `core::marker::Sync` is not implemented } diff --git a/src/test/compile-fail/no_share-rc.rs b/src/test/compile-fail/no_share-rc.rs index 0d3e380d4a12..4917db602e17 100644 --- a/src/test/compile-fail/no_share-rc.rs +++ b/src/test/compile-fail/no_share-rc.rs @@ -17,5 +17,4 @@ fn main() { let x = Rc::new(RefCell::new(5is)); bar(x); //~^ ERROR the trait `core::marker::Sync` is not implemented - //~^^ ERROR the trait `core::marker::Sync` is not implemented } diff --git a/src/test/compile-fail/no_share-struct.rs b/src/test/compile-fail/no_share-struct.rs index c7028ce97869..b5ccceb3b2a7 100644 --- a/src/test/compile-fail/no_share-struct.rs +++ b/src/test/compile-fail/no_share-struct.rs @@ -8,14 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::marker; +#![feature(optin_builtin_traits)] -struct Foo { a: isize, m: marker::NoSync } +use std::marker::Sync; + +struct Foo { a: isize } +impl !Sync for Foo {} fn bar(_: T) {} fn main() { - let x = Foo { a: 5, m: marker::NoSync }; + let x = Foo { a: 5 }; bar(x); //~^ ERROR the trait `core::marker::Sync` is not implemented } diff --git a/src/test/compile-fail/task-rng-isnt-sendable.rs b/src/test/compile-fail/task-rng-isnt-sendable.rs index fe31d81983e1..dc3385f4bb92 100644 --- a/src/test/compile-fail/task-rng-isnt-sendable.rs +++ b/src/test/compile-fail/task-rng-isnt-sendable.rs @@ -17,5 +17,4 @@ fn test_send() {} pub fn main() { test_send::(); //~^ ERROR `core::marker::Send` is not implemented - //~^^ ERROR `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/typeck-unsafe-always-share.rs b/src/test/compile-fail/typeck-unsafe-always-share.rs index a9113c6e99f4..38e3b5763483 100644 --- a/src/test/compile-fail/typeck-unsafe-always-share.rs +++ b/src/test/compile-fail/typeck-unsafe-always-share.rs @@ -10,29 +10,26 @@ // Verify that UnsafeCell is *always* sync regardless if `T` is sync. -// ignore-tidy-linelength +#![feature(optin_builtin_traits)] use std::cell::UnsafeCell; -use std::marker; +use std::marker::Sync; struct MySync { u: UnsafeCell } -struct NoSync { - m: marker::NoSync -} +struct NoSync; +impl !Sync for NoSync {} -fn test(s: T){ - -} +fn test(s: T) {} fn main() { let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0is)}); test(us); //~^ ERROR `core::marker::Sync` is not implemented - let uns = UnsafeCell::new(NoSync{m: marker::NoSync}); + let uns = UnsafeCell::new(NoSync); test(uns); //~^ ERROR `core::marker::Sync` is not implemented @@ -40,7 +37,6 @@ fn main() { test(ms); //~^ ERROR `core::marker::Sync` is not implemented - let ns = NoSync{m: marker::NoSync}; - test(ns); + test(NoSync); //~^ ERROR `core::marker::Sync` is not implemented } diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs index 4b7f11b05609..322de45daf03 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -19,5 +19,4 @@ fn main() { let i = box Rc::new(100is); f(i); //~^ ERROR `core::marker::Send` is not implemented - //~^^ ERROR `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/unsendable-class.rs b/src/test/compile-fail/unsendable-class.rs index abd93fdfc6c6..f51eee379347 100644 --- a/src/test/compile-fail/unsendable-class.rs +++ b/src/test/compile-fail/unsendable-class.rs @@ -31,6 +31,5 @@ fn main() { let cat = "kitty".to_string(); let (tx, _) = channel(); //~^ ERROR `core::marker::Send` is not implemented - //~^^ ERROR `core::marker::Send` is not implemented tx.send(foo(42, Rc::new(cat))); } diff --git a/src/test/run-pass/coherence-negative-impls-safe.rs b/src/test/run-pass/coherence-negative-impls-safe.rs index 646da74992f3..7844ef3faca4 100644 --- a/src/test/run-pass/coherence-negative-impls-safe.rs +++ b/src/test/run-pass/coherence-negative-impls-safe.rs @@ -14,8 +14,6 @@ use std::marker::Send; struct TestType; -unsafe impl Send for TestType {} - impl !Send for TestType {} fn main() {} diff --git a/src/test/run-pass/syntax-trait-polarity.rs b/src/test/run-pass/syntax-trait-polarity.rs index a91e5da15376..7c29675f3f4f 100644 --- a/src/test/run-pass/syntax-trait-polarity.rs +++ b/src/test/run-pass/syntax-trait-polarity.rs @@ -18,14 +18,14 @@ impl TestType {} trait TestTrait {} -unsafe impl !Send for TestType {} +impl !Send for TestType {} impl !TestTrait for TestType {} struct TestType2; impl TestType2 {} -unsafe impl !Send for TestType2 {} +impl !Send for TestType2 {} impl !TestTrait for TestType2 {} fn main() {}