We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d434688 commit 4639128Copy full SHA for 4639128
src/test/compile-fail/feature-gate-negate-unsigned.rs
@@ -16,7 +16,9 @@ impl std::ops::Neg for S {
16
fn neg(self) -> u32 { 0 }
17
}
18
19
-const _MAX: usize = -1;
+// FIXME(eddyb) move this back to a `-1` literal when
20
+// MIR building stops eagerly erroring in that case.
21
+const _MAX: usize = -(2 - 1);
22
//~^ WARN unary negation of unsigned integer
23
//~| ERROR unary negation of unsigned integer
24
//~| HELP use a cast or the `!` operator
0 commit comments