]>
Commit | Line | Data |
---|---|---|
ba9703b0 | 1 | #![feature(negative_impls)] |
74b04a01 | 2 | #![feature(marker_trait_attr)] |
85aaf69f | 3 | |
74b04a01 | 4 | #[marker] |
9346a6ac | 5 | trait MyTrait {} |
85aaf69f SL |
6 | |
7 | struct TestType<T>(::std::marker::PhantomData<T>); | |
8 | ||
ba9703b0 | 9 | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {} |
85aaf69f | 10 | |
ba9703b0 | 11 | impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and negative implementation |
85aaf69f | 12 | |
ba9703b0 | 13 | unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations |
85aaf69f SL |
14 | |
15 | impl !Send for TestType<i32> {} | |
16 | ||
17 | fn main() {} |