1
1
error: `(A * B)` is never greater than `B` and has therefore no effect
2
- --> $DIR/unnecessary_min.rs:8 :13
2
+ --> $DIR/unnecessary_min.rs:7 :13
3
3
|
4
4
LL | let _ = (A * B).min(B); // Both are constants
5
5
| ^^^^^^^^^^^^^^ help: try: `(A * B)`
@@ -8,103 +8,103 @@ LL | let _ = (A * B).min(B); // Both are constants
8
8
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_min)]`
9
9
10
10
error: `B` is never greater than `C` and has therefore no effect
11
- --> $DIR/unnecessary_min.rs:9 :13
11
+ --> $DIR/unnecessary_min.rs:8 :13
12
12
|
13
13
LL | let _ = C.min(B); // Both are constants
14
14
| ^^^^^^^^ help: try: `B`
15
15
16
16
error: `B` is never greater than `C` and has therefore no effect
17
- --> $DIR/unnecessary_min.rs:10 :13
17
+ --> $DIR/unnecessary_min.rs:9 :13
18
18
|
19
19
LL | let _ = B.min(C); // Both are constants
20
20
| ^^^^^^^^ help: try: `B`
21
21
22
22
error: `(-6_i32)` is never greater than `9` and has therefore no effect
23
- --> $DIR/unnecessary_min.rs:12 :13
23
+ --> $DIR/unnecessary_min.rs:11 :13
24
24
|
25
25
LL | let _ = (-6_i32).min(9); // Both are Literals
26
26
| ^^^^^^^^^^^^^^^ help: try: `(-6_i32)`
27
27
28
28
error: `6` is never greater than `9_u32` and has therefore no effect
29
- --> $DIR/unnecessary_min.rs:13 :13
29
+ --> $DIR/unnecessary_min.rs:12 :13
30
30
|
31
31
LL | let _ = 9_u32.min(6); // Both are Literals
32
32
| ^^^^^^^^^^^^ help: try: `6`
33
33
34
34
error: `6` is never greater than `7_u8` and has therefore no effect
35
- --> $DIR/unnecessary_min.rs:15 :13
35
+ --> $DIR/unnecessary_min.rs:14 :13
36
36
|
37
37
LL | let _ = 6.min(7_u8); // Both are Literals
38
38
| ^^^^^^^^^^^ help: try: `6`
39
39
40
40
error: `0` is never greater than `7_u8` and has therefore no effect
41
- --> $DIR/unnecessary_min.rs:17 :13
41
+ --> $DIR/unnecessary_min.rs:16 :13
42
42
|
43
43
LL | let _ = 0.min(7_u8); // unsigned with zero
44
44
| ^^^^^^^^^^^ help: try: `0`
45
45
46
46
error: `0_u32` is never greater than `7` and has therefore no effect
47
- --> $DIR/unnecessary_min.rs:18 :13
47
+ --> $DIR/unnecessary_min.rs:17 :13
48
48
|
49
49
LL | let _ = 7.min(0_u32); // unsigned with zero
50
50
| ^^^^^^^^^^^^ help: try: `0_u32`
51
51
52
52
error: `i32::MIN` is never greater than `42` and has therefore no effect
53
- --> $DIR/unnecessary_min.rs:20 :13
53
+ --> $DIR/unnecessary_min.rs:19 :13
54
54
|
55
55
LL | let _ = i32::MIN.min(42); // singed MIN
56
56
| ^^^^^^^^^^^^^^^^ help: try: `i32::MIN`
57
57
58
58
error: `i32::MIN` is never greater than `42` and has therefore no effect
59
- --> $DIR/unnecessary_min.rs:21 :13
59
+ --> $DIR/unnecessary_min.rs:20 :13
60
60
|
61
61
LL | let _ = 42.min(i32::MIN); // singed MIN
62
62
| ^^^^^^^^^^^^^^^^ help: try: `i32::MIN`
63
63
64
64
error: `42` is never greater than `i32::MAX` and has therefore no effect
65
- --> $DIR/unnecessary_min.rs:23 :13
65
+ --> $DIR/unnecessary_min.rs:22 :13
66
66
|
67
67
LL | let _ = i32::MAX.min(42); // singed MAX
68
68
| ^^^^^^^^^^^^^^^^ help: try: `42`
69
69
70
70
error: `42` is never greater than `i32::MAX` and has therefore no effect
71
- --> $DIR/unnecessary_min.rs:24 :13
71
+ --> $DIR/unnecessary_min.rs:23 :13
72
72
|
73
73
LL | let _ = 42.min(i32::MAX); // singed MAX
74
74
| ^^^^^^^^^^^^^^^^ help: try: `42`
75
75
76
76
error: `0` is never greater than `test_usize()` and has therefore no effect
77
- --> $DIR/unnecessary_min.rs:26 :13
77
+ --> $DIR/unnecessary_min.rs:25 :13
78
78
|
79
79
LL | let _ = 0.min(test_usize()); // unsigned with zero and function
80
80
| ^^^^^^^^^^^^^^^^^^^ help: try: `0`
81
81
82
82
error: `0` is never greater than `test_usize()` and has therefore no effect
83
- --> $DIR/unnecessary_min.rs:28 :13
83
+ --> $DIR/unnecessary_min.rs:27 :13
84
84
|
85
85
LL | let _ = test_usize().min(0); // unsigned with zero and function
86
86
| ^^^^^^^^^^^^^^^^^^^ help: try: `0`
87
87
88
88
error: `i64::MIN` is never greater than `test_i64()` and has therefore no effect
89
- --> $DIR/unnecessary_min.rs:30 :13
89
+ --> $DIR/unnecessary_min.rs:29 :13
90
90
|
91
91
LL | let _ = i64::MIN.min(test_i64()); // signed with MIN and function
92
92
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i64::MIN`
93
93
94
94
error: `i64::MIN` is never greater than `test_i64()` and has therefore no effect
95
- --> $DIR/unnecessary_min.rs:32 :13
95
+ --> $DIR/unnecessary_min.rs:31 :13
96
96
|
97
97
LL | let _ = test_i64().min(i64::MIN); // signed with MIN and function
98
98
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i64::MIN`
99
99
100
100
error: `test_i64()` is never greater than `i64::MAX` and has therefore no effect
101
- --> $DIR/unnecessary_min.rs:34 :13
101
+ --> $DIR/unnecessary_min.rs:33 :13
102
102
|
103
103
LL | let _ = i64::MAX.min(test_i64()); // signed with MAX and function
104
104
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `test_i64()`
105
105
106
106
error: `test_i64()` is never greater than `i64::MAX` and has therefore no effect
107
- --> $DIR/unnecessary_min.rs:35 :13
107
+ --> $DIR/unnecessary_min.rs:34 :13
108
108
|
109
109
LL | let _ = test_i64().min(i64::MAX); // signed with MAX and function
110
110
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `test_i64()`
0 commit comments