about summary refs log tree commit diff
path: root/tests/ui/specialization/specialization-overlap-negative.rs
blob: 244f21c7ba905fb3134a4120767dfb401825852f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(negative_impls)]
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete

trait MyTrait {}

struct TestType<T>(::std::marker::PhantomData<T>);

unsafe impl<T: Clone> Send for TestType<T> {}
impl<T: MyTrait> !Send for TestType<T> {}
//~^ ERROR found both positive and negative implementation of trait `Send` for type `TestType<_>`
//~| ERROR `!Send` impl requires `T: MyTrait` but the struct it is implemented for does not

fn main() {}