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