mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-01 12:37:37 +00:00
14 lines
471 B
Rust
14 lines
471 B
Rust
#![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() {}
|