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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
745 B
Plaintext
Raw Normal View History

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
|
2018-02-23 00:42:32 +00:00
LL | let _max: usize = -1;
| ^^ 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
help: you may have meant the maximum value of `usize`
|
LL | let _max: usize = usize::MAX;
| ~~~~~~~~~~
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
|
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
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`.