blob: dfe6910dfa5cbbb9bf09e76052668805a8f5e2b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
error: `(-6_i32)` is never greater than `9` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:13:13
|
LL | let _ = (-6_i32).min(9);
| ^^^^^^^^^^^^^^^ help: try: `(-6_i32)`
|
= note: `-D clippy::unnecessary-min-or-max` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_min_or_max)]`
error: `(-6_i32)` is never greater than `9` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:15:13
|
LL | let _ = (-6_i32).max(9);
| ^^^^^^^^^^^^^^^ help: try: `9`
error: `9_u32` is never smaller than `6` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:17:13
|
LL | let _ = 9_u32.min(6);
| ^^^^^^^^^^^^ help: try: `6`
error: `9_u32` is never smaller than `6` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:19:13
|
LL | let _ = 9_u32.max(6);
| ^^^^^^^^^^^^ help: try: `9_u32`
error: `6` is never greater than `7_u8` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:21:13
|
LL | let _ = 6.min(7_u8);
| ^^^^^^^^^^^ help: try: `6`
error: `6` is never greater than `7_u8` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:23:13
|
LL | let _ = 6.max(7_u8);
| ^^^^^^^^^^^ help: try: `7_u8`
error: `0` is never greater than `x` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:28:13
|
LL | let _ = 0.min(x);
| ^^^^^^^^ help: try: `0`
error: `0` is never greater than `x` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:30:13
|
LL | let _ = 0.max(x);
| ^^^^^^^^ help: try: `x`
error: `x` is never smaller than `0_u32` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:32:13
|
LL | let _ = x.min(0_u32);
| ^^^^^^^^^^^^ help: try: `0_u32`
error: `x` is never smaller than `0_u32` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:34:13
|
LL | let _ = x.max(0_u32);
| ^^^^^^^^^^^^ help: try: `x`
error: `i32::MIN` is never greater than `x` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:39:13
|
LL | let _ = i32::MIN.min(x);
| ^^^^^^^^^^^^^^^ help: try: `i32::MIN`
error: `i32::MIN` is never greater than `x` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:41:13
|
LL | let _ = i32::MIN.max(x);
| ^^^^^^^^^^^^^^^ help: try: `x`
error: `x` is never smaller than `i32::MIN` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:43:13
|
LL | let _ = x.min(i32::MIN);
| ^^^^^^^^^^^^^^^ help: try: `i32::MIN`
error: `x` is never smaller than `i32::MIN` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:45:13
|
LL | let _ = x.max(i32::MIN);
| ^^^^^^^^^^^^^^^ help: try: `x`
error: `x` is never smaller than `i32::MIN - 0` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:48:13
|
LL | let _ = x.min(i32::MIN - 0);
| ^^^^^^^^^^^^^^^^^^^ help: try: `i32::MIN - 0`
error: `x` is never smaller than `i32::MIN` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:50:13
|
LL | let _ = x.max(i32::MIN);
| ^^^^^^^^^^^^^^^ help: try: `x`
error: `x` is never smaller than `i32::MIN - 0` and has therefore no effect
--> tests/ui/unnecessary_min_or_max.rs:53:13
|
LL | let _ = x.min(i32::MIN - 0);
| ^^^^^^^^^^^^^^^^^^^ help: try: `i32::MIN - 0`
error: aborting due to 17 previous errors
|