]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-negate-unsigned.stderr
Rollup merge of #93273 - bjorn3:rustbuild_improvements, r=Mark-Simulacrum
[rust.git] / src / test / ui / feature-gates / feature-gate-negate-unsigned.stderr
1 error[E0600]: cannot apply unary operator `-` to type `usize`
2   --> $DIR/feature-gate-negate-unsigned.rs:10:23
3    |
4 LL |     let _max: usize = -1;
5    |                       ^^
6    |                       |
7    |                       cannot apply unary operator `-`
8    |                       help: you may have meant the maximum value of `usize`: `usize::MAX`
9    |
10    = note: unsigned values cannot be negated
11
12 error[E0600]: cannot apply unary operator `-` to type `u8`
13   --> $DIR/feature-gate-negate-unsigned.rs:14:14
14    |
15 LL |     let _y = -x;
16    |              ^^ cannot apply unary operator `-`
17    |
18    = note: unsigned values cannot be negated
19
20 error: aborting due to 2 previous errors
21
22 For more information about this error, try `rustc --explain E0600`.