2020-01-09 10:56:38 +00:00
|
|
|
#![feature(negative_impls)]
|
2020-01-25 20:30:19 +00:00
|
|
|
#![feature(marker_trait_attr)]
|
2015-01-07 18:27:01 +00:00
|
|
|
|
2020-01-25 20:30:19 +00:00
|
|
|
#[marker]
|
2015-04-18 05:12:20 +00:00
|
|
|
trait MyTrait {}
|
2015-01-07 18:27:01 +00:00
|
|
|
|
2015-02-12 15:29:52 +00:00
|
|
|
struct TestType<T>(::std::marker::PhantomData<T>);
|
2015-01-13 19:21:19 +00:00
|
|
|
|
2020-01-08 19:10:59 +00:00
|
|
|
unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
|
2015-01-13 19:21:19 +00:00
|
|
|
|
2020-01-08 19:10:59 +00:00
|
|
|
impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and negative implementation
|
2015-01-07 18:27:01 +00:00
|
|
|
|
2020-01-08 19:10:59 +00:00
|
|
|
unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations
|
2015-01-13 19:21:19 +00:00
|
|
|
|
|
|
|
impl !Send for TestType<i32> {}
|
2015-01-07 18:27:01 +00:00
|
|
|
|
|
|
|
fn main() {}
|