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