]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/coherence/coherence-conflicting-negative-trait-impl.rs
make a custom error for overlap with negative impls
[rust.git] / src / test / ui / coherence / coherence-conflicting-negative-trait-impl.rs
index b4f5f9ef56bb10b6b7f42795b7f18ff54b6c8391..0fabb5ec91d31552203e56a50a51ef69f90c2c21 100644 (file)
@@ -6,13 +6,11 @@ trait MyTrait {}
 
 struct TestType<T>(::std::marker::PhantomData<T>);
 
-unsafe impl<T: MyTrait+'static> Send for TestType<T> {}
+unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
 
-impl<T: MyTrait> !Send for TestType<T> {}
-//~^ ERROR conflicting implementations
+impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and negative implementation
 
-unsafe impl<T:'static> Send for TestType<T> {}
-//~^ ERROR conflicting implementations
+unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations
 
 impl !Send for TestType<i32> {}