]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: this `min`/`max` combination leads to constant result |
2 | --> $DIR/min_max.rs:24:5 | |
3 | | | |
4 | LL | min(1, max(3, x)); | |
5 | | ^^^^^^^^^^^^^^^^^ | |
6 | | | |
7 | = note: `-D clippy::min-max` implied by `-D warnings` | |
8 | ||
9 | error: this `min`/`max` combination leads to constant result | |
10 | --> $DIR/min_max.rs:25:5 | |
11 | | | |
12 | LL | min(max(3, x), 1); | |
13 | | ^^^^^^^^^^^^^^^^^ | |
14 | ||
15 | error: this `min`/`max` combination leads to constant result | |
16 | --> $DIR/min_max.rs:26:5 | |
17 | | | |
18 | LL | max(min(x, 1), 3); | |
19 | | ^^^^^^^^^^^^^^^^^ | |
20 | ||
21 | error: this `min`/`max` combination leads to constant result | |
22 | --> $DIR/min_max.rs:27:5 | |
23 | | | |
24 | LL | max(3, min(x, 1)); | |
25 | | ^^^^^^^^^^^^^^^^^ | |
26 | ||
27 | error: this `min`/`max` combination leads to constant result | |
28 | --> $DIR/min_max.rs:29:5 | |
29 | | | |
30 | LL | my_max(3, my_min(x, 1)); | |
31 | | ^^^^^^^^^^^^^^^^^^^^^^^ | |
32 | ||
33 | error: this `min`/`max` combination leads to constant result | |
34 | --> $DIR/min_max.rs:41:5 | |
35 | | | |
36 | LL | min("Apple", max("Zoo", s)); | |
37 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
38 | ||
39 | error: this `min`/`max` combination leads to constant result | |
40 | --> $DIR/min_max.rs:42:5 | |
41 | | | |
42 | LL | max(min(s, "Apple"), "Zoo"); | |
43 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
44 | ||
45 | error: this `min`/`max` combination leads to constant result | |
46 | --> $DIR/min_max.rs:47:5 | |
47 | | | |
48 | LL | x.min(1).max(3); | |
49 | | ^^^^^^^^^^^^^^^ | |
50 | ||
51 | error: this `min`/`max` combination leads to constant result | |
52 | --> $DIR/min_max.rs:48:5 | |
53 | | | |
54 | LL | x.max(3).min(1); | |
55 | | ^^^^^^^^^^^^^^^ | |
56 | ||
57 | error: this `min`/`max` combination leads to constant result | |
58 | --> $DIR/min_max.rs:49:5 | |
59 | | | |
60 | LL | f.max(3f32).min(1f32); | |
61 | | ^^^^^^^^^^^^^^^^^^^^^ | |
62 | ||
63 | error: this `min`/`max` combination leads to constant result | |
64 | --> $DIR/min_max.rs:55:5 | |
65 | | | |
66 | LL | max(x.min(1), 3); | |
67 | | ^^^^^^^^^^^^^^^^ | |
68 | ||
69 | error: this `min`/`max` combination leads to constant result | |
70 | --> $DIR/min_max.rs:58:5 | |
71 | | | |
72 | LL | s.max("Zoo").min("Apple"); | |
73 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
74 | ||
75 | error: this `min`/`max` combination leads to constant result | |
76 | --> $DIR/min_max.rs:59:5 | |
77 | | | |
78 | LL | s.min("Apple").max("Zoo"); | |
79 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
80 | ||
81 | error: aborting due to 13 previous errors | |
82 |