]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/syntax-trait-polarity.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / traits / syntax-trait-polarity.rs
CommitLineData
ba9703b0 1#![feature(negative_impls)]
1a4d82fc
JJ
2
3use std::marker::Send;
4
5struct TestType;
6
7impl !TestType {}
2c00a5a8 8//~^ ERROR inherent impls cannot be negative
1a4d82fc
JJ
9
10trait TestTrait {}
11
12unsafe impl !Send for TestType {}
2c00a5a8 13//~^ ERROR negative impls cannot be unsafe
1a4d82fc
JJ
14impl !TestTrait for TestType {}
15
2c00a5a8 16struct TestType2<T>(T);
1a4d82fc
JJ
17
18impl<T> !TestType2<T> {}
2c00a5a8 19//~^ ERROR inherent impls cannot be negative
1a4d82fc
JJ
20
21unsafe impl<T> !Send for TestType2<T> {}
2c00a5a8 22//~^ ERROR negative impls cannot be unsafe
1a4d82fc
JJ
23impl<T> !TestTrait for TestType2<T> {}
24
25fn main() {}