rust-clippy/tests/ui/implicit_saturating_sub.stderr

189 lines
5.3 KiB
Text
Raw Normal View History

error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:13:5
|
LL | / if u_8 > 0 {
2020-04-17 19:46:32 +00:00
LL | | u_8 = u_8 - 1;
2020-04-06 18:10:41 +00:00
LL | | }
| |_____^ help: try: `u_8 = u_8.saturating_sub(1);`
|
= note: `-D clippy::implicit-saturating-sub` implied by `-D warnings`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:20:13
|
LL | / if u_8 > 0 {
LL | | u_8 -= 1;
LL | | }
| |_____________^ help: try: `u_8 = u_8.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:34:5
|
LL | / if u_16 > 0 {
LL | | u_16 -= 1;
LL | | }
| |_____^ help: try: `u_16 = u_16.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:44:5
|
LL | / if u_32 != 0 {
LL | | u_32 -= 1;
LL | | }
| |_____^ help: try: `u_32 = u_32.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:65:5
|
LL | / if u_64 > 0 {
LL | | u_64 -= 1;
LL | | }
| |_____^ help: try: `u_64 = u_64.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:70:5
|
LL | / if 0 < u_64 {
LL | | u_64 -= 1;
LL | | }
| |_____^ help: try: `u_64 = u_64.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:75:5
|
LL | / if 0 != u_64 {
LL | | u_64 -= 1;
LL | | }
| |_____^ help: try: `u_64 = u_64.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:96:5
|
LL | / if u_usize > 0 {
LL | | u_usize -= 1;
LL | | }
| |_____^ help: try: `u_usize = u_usize.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:108:5
|
LL | / if i_8 > i8::MIN {
LL | | i_8 -= 1;
LL | | }
| |_____^ help: try: `i_8 = i_8.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:113:5
|
2020-06-02 07:59:11 +00:00
LL | / if i_8 > i8::MIN {
2020-04-06 18:10:41 +00:00
LL | | i_8 -= 1;
LL | | }
| |_____^ help: try: `i_8 = i_8.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:118:5
|
LL | / if i_8 != i8::MIN {
LL | | i_8 -= 1;
LL | | }
| |_____^ help: try: `i_8 = i_8.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:123:5
|
2020-06-02 07:59:11 +00:00
LL | / if i_8 != i8::MIN {
2020-04-06 18:10:41 +00:00
LL | | i_8 -= 1;
LL | | }
| |_____^ help: try: `i_8 = i_8.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:133:5
|
LL | / if i_16 > i16::MIN {
LL | | i_16 -= 1;
LL | | }
| |_____^ help: try: `i_16 = i_16.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:138:5
|
2020-06-02 07:59:11 +00:00
LL | / if i_16 > i16::MIN {
2020-04-06 18:10:41 +00:00
LL | | i_16 -= 1;
LL | | }
| |_____^ help: try: `i_16 = i_16.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:143:5
|
LL | / if i_16 != i16::MIN {
LL | | i_16 -= 1;
LL | | }
| |_____^ help: try: `i_16 = i_16.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:148:5
|
2020-06-02 07:59:11 +00:00
LL | / if i_16 != i16::MIN {
2020-04-06 18:10:41 +00:00
LL | | i_16 -= 1;
LL | | }
| |_____^ help: try: `i_16 = i_16.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:158:5
|
LL | / if i_32 > i32::MIN {
LL | | i_32 -= 1;
LL | | }
| |_____^ help: try: `i_32 = i_32.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:163:5
|
2020-06-02 07:59:11 +00:00
LL | / if i_32 > i32::MIN {
2020-04-06 18:10:41 +00:00
LL | | i_32 -= 1;
LL | | }
| |_____^ help: try: `i_32 = i_32.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:168:5
|
LL | / if i_32 != i32::MIN {
LL | | i_32 -= 1;
LL | | }
| |_____^ help: try: `i_32 = i_32.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:173:5
|
2020-06-02 07:59:11 +00:00
LL | / if i_32 != i32::MIN {
2020-04-06 18:10:41 +00:00
LL | | i_32 -= 1;
LL | | }
| |_____^ help: try: `i_32 = i_32.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:183:5
|
2020-06-02 07:59:11 +00:00
LL | / if i64::MIN < i_64 {
2020-04-06 18:10:41 +00:00
LL | | i_64 -= 1;
LL | | }
| |_____^ help: try: `i_64 = i_64.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:188:5
|
LL | / if i64::MIN != i_64 {
LL | | i_64 -= 1;
LL | | }
| |_____^ help: try: `i_64 = i_64.saturating_sub(1);`
error: implicitly performing saturating subtraction
2020-04-06 18:10:41 +00:00
--> $DIR/implicit_saturating_sub.rs:193:5
|
LL | / if i64::MIN < i_64 {
LL | | i_64 -= 1;
LL | | }
| |_____^ help: try: `i_64 = i_64.saturating_sub(1);`
error: aborting due to 23 previous errors