1 // Test that negating unsigned integers doesn't compile
4 impl std::ops::Neg for S {
6 fn neg(self) -> u32 { 0 }
11 //~^ ERROR cannot apply unary operator `-` to type `usize`
15 //~^ ERROR cannot apply unary operator `-` to type `u8`
17 -S; // should not trigger the gate; issue 26840