]> git.proxmox.com Git - rustc.git/blame - src/test/ui/coherence/coherence-conflicting-negative-trait-impl.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / coherence / coherence-conflicting-negative-trait-impl.rs
CommitLineData
ba9703b0 1#![feature(negative_impls)]
74b04a01 2#![feature(marker_trait_attr)]
85aaf69f 3
74b04a01 4#[marker]
9346a6ac 5trait MyTrait {}
85aaf69f
SL
6
7struct TestType<T>(::std::marker::PhantomData<T>);
8
ba9703b0 9unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
85aaf69f 10
ba9703b0 11impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and negative implementation
85aaf69f 12
ba9703b0 13unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations
85aaf69f
SL
14
15impl !Send for TestType<i32> {}
16
17fn main() {}