summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/comparison_to_empty.stderr
blob: 83d431fd52b4909b391180efc4a47375231dafab (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
error: comparison to empty slice
  --> $DIR/comparison_to_empty.rs:8:13
   |
LL |     let _ = s == "";
   |             ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
   |
   = note: `-D clippy::comparison-to-empty` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::comparison_to_empty)]`

error: comparison to empty slice
  --> $DIR/comparison_to_empty.rs:9:13
   |
LL |     let _ = s != "";
   |             ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()`

error: comparison to empty slice
  --> $DIR/comparison_to_empty.rs:12:13
   |
LL |     let _ = v == [];
   |             ^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`

error: comparison to empty slice
  --> $DIR/comparison_to_empty.rs:13:13
   |
LL |     let _ = v != [];
   |             ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()`

error: comparison to empty slice using `if let`
  --> $DIR/comparison_to_empty.rs:14:8
   |
LL |     if let [] = &*v {}
   |        ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(*v).is_empty()`

error: comparison to empty slice using `if let`
  --> $DIR/comparison_to_empty.rs:16:8
   |
LL |     if let [] = s {}
   |        ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`

error: comparison to empty slice using `if let`
  --> $DIR/comparison_to_empty.rs:17:8
   |
LL |     if let [] = &*s {}
   |        ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`

error: comparison to empty slice using `if let`
  --> $DIR/comparison_to_empty.rs:18:8
   |
LL |     if let [] = &*s
   |        ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`

error: comparison to empty slice
  --> $DIR/comparison_to_empty.rs:19:12
   |
LL |         && s == []
   |            ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`

error: aborting due to 9 previous errors