]>
Commit | Line | Data |
---|---|---|
ba9703b0 | 1 | #![feature(negative_impls)] |
1a4d82fc JJ |
2 | |
3 | use std::marker::Send; | |
4 | ||
5 | struct TestType; | |
6 | ||
7 | impl !TestType {} | |
2c00a5a8 | 8 | //~^ ERROR inherent impls cannot be negative |
1a4d82fc JJ |
9 | |
10 | trait TestTrait {} | |
11 | ||
12 | unsafe impl !Send for TestType {} | |
2c00a5a8 | 13 | //~^ ERROR negative impls cannot be unsafe |
1a4d82fc JJ |
14 | impl !TestTrait for TestType {} |
15 | ||
2c00a5a8 | 16 | struct TestType2<T>(T); |
1a4d82fc JJ |
17 | |
18 | impl<T> !TestType2<T> {} | |
2c00a5a8 | 19 | //~^ ERROR inherent impls cannot be negative |
1a4d82fc JJ |
20 | |
21 | unsafe impl<T> !Send for TestType2<T> {} | |
2c00a5a8 | 22 | //~^ ERROR negative impls cannot be unsafe |
1a4d82fc JJ |
23 | impl<T> !TestTrait for TestType2<T> {} |
24 | ||
25 | fn main() {} |