fork/rust

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

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

master
2.0 KiB59 linesraw
1error: comparison to empty slice
2  --> $DIR/comparison_to_empty.rs:8:13
3   |
4LL |     let _ = s == "";
5   |             ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
6   |
7   = note: `-D clippy::comparison-to-empty` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::comparison_to_empty)]`
9
10error: comparison to empty slice
11  --> $DIR/comparison_to_empty.rs:9:13
12   |
13LL |     let _ = s != "";
14   |             ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()`
15
16error: comparison to empty slice
17  --> $DIR/comparison_to_empty.rs:12:13
18   |
19LL |     let _ = v == [];
20   |             ^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
21
22error: comparison to empty slice
23  --> $DIR/comparison_to_empty.rs:13:13
24   |
25LL |     let _ = v != [];
26   |             ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()`
27
28error: comparison to empty slice using `if let`
29  --> $DIR/comparison_to_empty.rs:14:8
30   |
31LL |     if let [] = &*v {}
32   |        ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(*v).is_empty()`
33
34error: comparison to empty slice using `if let`
35  --> $DIR/comparison_to_empty.rs:16:8
36   |
37LL |     if let [] = s {}
38   |        ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
39
40error: comparison to empty slice using `if let`
41  --> $DIR/comparison_to_empty.rs:17:8
42   |
43LL |     if let [] = &*s {}
44   |        ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
45
46error: comparison to empty slice using `if let`
47  --> $DIR/comparison_to_empty.rs:18:8
48   |
49LL |     if let [] = &*s && s == [] {}
50   |        ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
51
52error: comparison to empty slice
53  --> $DIR/comparison_to_empty.rs:18:24
54   |
55LL |     if let [] = &*s && s == [] {}
56   |                        ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
57
58error: aborting due to 9 previous errors
59