]>
Commit | Line | Data |
---|---|---|
f20569fa | 1 | error: comparison to empty slice |
c620b35d | 2 | --> tests/ui/comparison_to_empty.rs:8:13 |
f20569fa XL |
3 | | |
4 | LL | 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` | |
781aab86 | 8 | = help: to override `-D warnings` add `#[allow(clippy::comparison_to_empty)]` |
f20569fa XL |
9 | |
10 | error: comparison to empty slice | |
c620b35d | 11 | --> tests/ui/comparison_to_empty.rs:9:13 |
f20569fa XL |
12 | | |
13 | LL | let _ = s != ""; | |
14 | | ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()` | |
15 | ||
16 | error: comparison to empty slice | |
c620b35d | 17 | --> tests/ui/comparison_to_empty.rs:12:13 |
f20569fa XL |
18 | | |
19 | LL | let _ = v == []; | |
20 | | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()` | |
21 | ||
22 | error: comparison to empty slice | |
c620b35d | 23 | --> tests/ui/comparison_to_empty.rs:13:13 |
f20569fa XL |
24 | | |
25 | LL | let _ = v != []; | |
26 | | ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()` | |
27 | ||
add651ee | 28 | error: comparison to empty slice using `if let` |
c620b35d | 29 | --> tests/ui/comparison_to_empty.rs:14:8 |
add651ee FG |
30 | | |
31 | LL | if let [] = &*v {} | |
32 | | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(*v).is_empty()` | |
33 | ||
34 | error: comparison to empty slice using `if let` | |
c620b35d | 35 | --> tests/ui/comparison_to_empty.rs:16:8 |
add651ee FG |
36 | | |
37 | LL | if let [] = s {} | |
38 | | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()` | |
39 | ||
40 | error: comparison to empty slice using `if let` | |
c620b35d | 41 | --> tests/ui/comparison_to_empty.rs:17:8 |
add651ee FG |
42 | | |
43 | LL | if let [] = &*s {} | |
44 | | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()` | |
45 | ||
46 | error: comparison to empty slice using `if let` | |
c620b35d | 47 | --> tests/ui/comparison_to_empty.rs:18:8 |
add651ee | 48 | | |
ed00b5ec | 49 | LL | if let [] = &*s |
add651ee FG |
50 | | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()` |
51 | ||
52 | error: comparison to empty slice | |
c620b35d | 53 | --> tests/ui/comparison_to_empty.rs:19:12 |
add651ee | 54 | | |
ed00b5ec FG |
55 | LL | && s == [] |
56 | | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()` | |
add651ee FG |
57 | |
58 | error: aborting due to 9 previous errors | |
f20569fa | 59 |