2017-12-06 09:27:47 +01:00
|
|
|
error[E0600]: cannot apply unary operator `-` to type `usize`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/feature-gate-negate-unsigned.rs:10:23
|
2017-12-06 09:27:47 +01:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | let _max: usize = -1;
|
2024-07-05 00:52:01 +00:00
|
|
|
| ^^ cannot apply unary operator `-`
|
2018-04-22 20:35:21 +03:00
|
|
|
|
|
2018-05-08 22:20:41 +03:00
|
|
|
= note: unsigned values cannot be negated
|
2024-07-05 00:52:01 +00:00
|
|
|
help: you may have meant the maximum value of `usize`
|
|
|
|
|
|
|
|
|
LL | let _max: usize = usize::MAX;
|
|
|
|
| ~~~~~~~~~~
|
2017-12-06 09:27:47 +01:00
|
|
|
|
|
|
|
error[E0600]: cannot apply unary operator `-` to type `u8`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/feature-gate-negate-unsigned.rs:14:14
|
2017-12-06 09:27:47 +01:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | let _y = -x;
|
2018-05-08 22:20:41 +03:00
|
|
|
| ^^ cannot apply unary operator `-`
|
2018-04-22 20:35:21 +03:00
|
|
|
|
|
2018-05-08 22:20:41 +03:00
|
|
|
= note: unsigned values cannot be negated
|
2017-12-06 09:27:47 +01:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0600`.
|