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