fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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