2020-01-09 04:56:38 -06:00
|
|
|
#![feature(negative_impls)]
|
2020-01-25 14:30:19 -06:00
|
|
|
#![feature(marker_trait_attr)]
|
2015-01-07 12:27:01 -06:00
|
|
|
|
2020-01-25 14:30:19 -06:00
|
|
|
#[marker]
|
2015-04-18 00:12:20 -05:00
|
|
|
trait MyTrait {}
|
2015-01-07 12:27:01 -06:00
|
|
|
|
2015-02-12 09:29:52 -06:00
|
|
|
struct TestType<T>(::std::marker::PhantomData<T>);
|
2015-01-13 13:21:19 -06:00
|
|
|
|
2020-01-08 13:10:59 -06:00
|
|
|
unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
|
2015-01-13 13:21:19 -06:00
|
|
|
|
2020-01-08 13:10:59 -06:00
|
|
|
impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and negative implementation
|
2015-01-07 12:27:01 -06:00
|
|
|
|
2020-01-08 13:10:59 -06:00
|
|
|
unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations
|
2015-01-13 13:21:19 -06:00
|
|
|
|
|
|
|
impl !Send for TestType<i32> {}
|
2023-03-06 07:05:35 -06:00
|
|
|
//~^ WARNING
|
|
|
|
//~| WARNING this will change its meaning
|
2015-01-07 12:27:01 -06:00
|
|
|
|
|
|
|
fn main() {}
|