]>
Commit | Line | Data |
---|---|---|
f20569fa | 1 | error: comparison to empty slice |
781aab86 | 2 | --> $DIR/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 | |
781aab86 | 11 | --> $DIR/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 | |
781aab86 | 17 | --> $DIR/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 | |
781aab86 | 23 | --> $DIR/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` |
781aab86 | 29 | --> $DIR/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` | |
781aab86 | 35 | --> $DIR/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` | |
781aab86 | 41 | --> $DIR/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` | |
781aab86 | 47 | --> $DIR/comparison_to_empty.rs:18:8 |
add651ee FG |
48 | | |
49 | LL | if let [] = &*s && s == [] {} | |
50 | | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()` | |
51 | ||
52 | error: comparison to empty slice | |
781aab86 | 53 | --> $DIR/comparison_to_empty.rs:18:24 |
add651ee FG |
54 | | |
55 | LL | if let [] = &*s && s == [] {} | |
56 | | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()` | |
57 | ||
58 | error: aborting due to 9 previous errors | |
f20569fa | 59 |