]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/comparison_to_empty.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / comparison_to_empty.stderr
CommitLineData
f20569fa 1error: comparison to empty slice
781aab86 2 --> $DIR/comparison_to_empty.rs:8:13
f20569fa
XL
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`
781aab86 8 = help: to override `-D warnings` add `#[allow(clippy::comparison_to_empty)]`
f20569fa
XL
9
10error: comparison to empty slice
781aab86 11 --> $DIR/comparison_to_empty.rs:9:13
f20569fa
XL
12 |
13LL | let _ = s != "";
14 | ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()`
15
16error: comparison to empty slice
781aab86 17 --> $DIR/comparison_to_empty.rs:12:13
f20569fa
XL
18 |
19LL | let _ = v == [];
20 | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
21
22error: comparison to empty slice
781aab86 23 --> $DIR/comparison_to_empty.rs:13:13
f20569fa
XL
24 |
25LL | let _ = v != [];
26 | ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()`
27
add651ee 28error: comparison to empty slice using `if let`
781aab86 29 --> $DIR/comparison_to_empty.rs:14:8
add651ee
FG
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`
781aab86 35 --> $DIR/comparison_to_empty.rs:16:8
add651ee
FG
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`
781aab86 41 --> $DIR/comparison_to_empty.rs:17:8
add651ee
FG
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`
781aab86 47 --> $DIR/comparison_to_empty.rs:18:8
add651ee
FG
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
781aab86 53 --> $DIR/comparison_to_empty.rs:18:24
add651ee
FG
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
f20569fa 59