rust/tests/ui/implicit_saturating_add.stderr
2022-10-03 16:46:38 +05:30

198 lines
5.4 KiB
Plaintext

error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:23:5
|
LL | / if u_8 != u8::MAX {
LL | | u_8 += 1;
LL | | }
| |_____^ help: use instead: `u_8 = u_8.saturating_add(1);`
|
= note: `-D clippy::implicit-saturating-add` implied by `-D warnings`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:27:5
|
LL | / if u_8 < u8::MAX {
LL | | u_8 += 1;
LL | | }
| |_____^ help: use instead: `u_8 = u_8.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:35:5
|
LL | / if u_16 != u16::MAX {
LL | | u_16 += 1;
LL | | }
| |_____^ help: use instead: `u_16 = u_16.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:39:5
|
LL | / if u_16 < u16::MAX {
LL | | u_16 += 1;
LL | | }
| |_____^ help: use instead: `u_16 = u_16.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:43:5
|
LL | / if u16::MAX > u_16 {
LL | | u_16 += 1;
LL | | }
| |_____^ help: use instead: `u_16 = u_16.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:47:5
|
LL | / if u_32 != u32::MAX {
LL | | u_32 += 1;
LL | | }
| |_____^ help: use instead: `u_32 = u_32.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:51:5
|
LL | / if u_32 < u32::MAX {
LL | | u_32 += 1;
LL | | }
| |_____^ help: use instead: `u_32 = u_32.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:55:5
|
LL | / if u32::MAX > u_32 {
LL | | u_32 += 1;
LL | | }
| |_____^ help: use instead: `u_32 = u_32.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:59:5
|
LL | / if u_64 != u64::MAX {
LL | | u_64 += 1;
LL | | }
| |_____^ help: use instead: `u_64 = u_64.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:63:5
|
LL | / if u_64 < u64::MAX {
LL | | u_64 += 1;
LL | | }
| |_____^ help: use instead: `u_64 = u_64.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:67:5
|
LL | / if u64::MAX > u_64 {
LL | | u_64 += 1;
LL | | }
| |_____^ help: use instead: `u_64 = u_64.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:71:5
|
LL | / if i_8 != i8::MAX {
LL | | i_8 += 1;
LL | | }
| |_____^ help: use instead: `i_8 = i_8.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:75:5
|
LL | / if i_8 < i8::MAX {
LL | | i_8 += 1;
LL | | }
| |_____^ help: use instead: `i_8 = i_8.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:79:5
|
LL | / if i8::MAX > i_8 {
LL | | i_8 += 1;
LL | | }
| |_____^ help: use instead: `i_8 = i_8.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:83:5
|
LL | / if i_16 != i16::MAX {
LL | | i_16 += 1;
LL | | }
| |_____^ help: use instead: `i_16 = i_16.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:87:5
|
LL | / if i_16 < i16::MAX {
LL | | i_16 += 1;
LL | | }
| |_____^ help: use instead: `i_16 = i_16.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:91:5
|
LL | / if i16::MAX > i_16 {
LL | | i_16 += 1;
LL | | }
| |_____^ help: use instead: `i_16 = i_16.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:95:5
|
LL | / if i_32 != i32::MAX {
LL | | i_32 += 1;
LL | | }
| |_____^ help: use instead: `i_32 = i_32.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:99:5
|
LL | / if i_32 < i32::MAX {
LL | | i_32 += 1;
LL | | }
| |_____^ help: use instead: `i_32 = i_32.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:103:5
|
LL | / if i32::MAX > i_32 {
LL | | i_32 += 1;
LL | | }
| |_____^ help: use instead: `i_32 = i_32.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:107:5
|
LL | / if i_64 != i64::MAX {
LL | | i_64 += 1;
LL | | }
| |_____^ help: use instead: `i_64 = i_64.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:111:5
|
LL | / if i_64 < i64::MAX {
LL | | i_64 += 1;
LL | | }
| |_____^ help: use instead: `i_64 = i_64.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:115:5
|
LL | / if i64::MAX > i_64 {
LL | | i_64 += 1;
LL | | }
| |_____^ help: use instead: `i_64 = i_64.saturating_add(1);`
error: manual saturating add detected
--> $DIR/implicit_saturating_add.rs:151:12
|
LL | } else if u_32 < u32::MAX {
| ____________^
LL | | u_32 += 1;
LL | | }
| |_____^ help: use instead: `{u_32 = u_32.saturating_add(1); }`
error: aborting due to 24 previous errors