]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-conflicting-negative-trait-impl.rs
Merge commit 'ea199bacef07213dbe008841b89c450e3bf0c638' into rustfmt-sync
[rust.git] / src / test / 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() {}