rust/tests/ui/feature-gates/feature-gate-negate-unsigned.stderr

23 lines
760 B
Plaintext
Raw Normal View History

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