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