2020-01-09 10:56:38 +00:00
|
|
|
#![feature(negative_impls)]
|
2015-02-17 12:48:32 +00:00
|
|
|
|
2015-03-06 20:55:30 +00:00
|
|
|
use std::marker::Copy;
|
2015-01-15 00:40:33 +00:00
|
|
|
|
|
|
|
enum TestE {
|
2020-01-09 10:56:38 +00:00
|
|
|
A,
|
2015-01-15 00:40:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
struct MyType;
|
|
|
|
|
2015-02-17 12:48:32 +00:00
|
|
|
struct NotSync;
|
|
|
|
impl !Sync for NotSync {}
|
|
|
|
|
2015-01-15 00:40:33 +00:00
|
|
|
unsafe impl Send for TestE {}
|
|
|
|
unsafe impl Send for MyType {}
|
|
|
|
unsafe impl Send for (MyType, MyType) {}
|
2019-10-26 15:28:02 +00:00
|
|
|
//~^ ERROR E0117
|
2015-01-15 00:40:33 +00:00
|
|
|
|
2015-02-17 12:48:32 +00:00
|
|
|
unsafe impl Send for &'static NotSync {}
|
2019-10-26 15:28:02 +00:00
|
|
|
//~^ ERROR E0321
|
2015-01-15 00:40:33 +00:00
|
|
|
|
|
|
|
unsafe impl Send for [MyType] {}
|
2019-10-26 15:28:02 +00:00
|
|
|
//~^ ERROR E0117
|
2015-01-15 00:40:33 +00:00
|
|
|
|
2015-02-17 12:48:32 +00:00
|
|
|
unsafe impl Send for &'static [NotSync] {}
|
2021-10-21 13:36:35 +00:00
|
|
|
//~^ ERROR only traits defined in the current crate
|
2015-01-15 00:40:33 +00:00
|
|
|
|
2020-01-09 10:56:38 +00:00
|
|
|
fn main() {}
|