]> git.lizzy.rs Git - rust.git/blob - tests/ui/coherence/coherence-conflicting-negative-trait-impl.rs
Auto merge of #106853 - TimNN:undo-remap, r=oli-obk
[rust.git] / tests / ui / coherence / coherence-conflicting-negative-trait-impl.rs
1 #![feature(negative_impls)]
2 #![feature(marker_trait_attr)]
3
4 #[marker]
5 trait MyTrait {}
6
7 struct TestType<T>(::std::marker::PhantomData<T>);
8
9 unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
10
11 impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and negative implementation
12
13 unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations
14
15 impl !Send for TestType<i32> {}
16
17 fn main() {}