]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/comparison_to_empty.stderr
bump version to 1.80.1+dfsg1-1~bpo12+pve1
[rustc.git] / src / tools / clippy / tests / ui / comparison_to_empty.stderr
CommitLineData
f20569fa 1error: comparison to empty slice
c620b35d 2 --> tests/ui/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
c620b35d 11 --> tests/ui/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
c620b35d 17 --> tests/ui/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
c620b35d 23 --> tests/ui/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`
c620b35d 29 --> tests/ui/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`
c620b35d 35 --> tests/ui/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`
c620b35d 41 --> tests/ui/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`
c620b35d 47 --> tests/ui/comparison_to_empty.rs:18:8
add651ee 48 |
ed00b5ec 49LL | if let [] = &*s
add651ee
FG
50 | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
51
52error: comparison to empty slice
c620b35d 53 --> tests/ui/comparison_to_empty.rs:19:12
add651ee 54 |
ed00b5ec
FG
55LL | && s == []
56 | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
add651ee
FG
57
58error: aborting due to 9 previous errors
f20569fa 59