]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/comparison_to_empty.stderr
Auto merge of #87686 - matthiaskrgr:clippy_august_21_perf, r=jackh726
[rust.git] / src / tools / clippy / tests / ui / comparison_to_empty.stderr
1 error: comparison to empty slice
2   --> $DIR/comparison_to_empty.rs:8:13
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`
8
9 error: comparison to empty slice
10   --> $DIR/comparison_to_empty.rs:9:13
11    |
12 LL |     let _ = s != "";
13    |             ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()`
14
15 error: comparison to empty slice
16   --> $DIR/comparison_to_empty.rs:12:13
17    |
18 LL |     let _ = v == [];
19    |             ^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
20
21 error: comparison to empty slice
22   --> $DIR/comparison_to_empty.rs:13:13
23    |
24 LL |     let _ = v != [];
25    |             ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()`
26
27 error: aborting due to 4 previous errors
28