rust/tests/ui/comparison_to_empty.stderr

59 lines
2.0 KiB
Plaintext
Raw Normal View History

error: comparison to empty slice
2023-07-27 06:40:22 -05:00
--> $DIR/comparison_to_empty.rs:8:13
|
LL | let _ = s == "";
| ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
|
= note: `-D clippy::comparison-to-empty` implied by `-D warnings`
error: comparison to empty slice
2023-07-27 06:40:22 -05:00
--> $DIR/comparison_to_empty.rs:9:13
|
LL | let _ = s != "";
| ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()`
error: comparison to empty slice
2023-07-27 06:40:22 -05:00
--> $DIR/comparison_to_empty.rs:12:13
|
LL | let _ = v == [];
| ^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
error: comparison to empty slice
2023-07-27 06:40:22 -05:00
--> $DIR/comparison_to_empty.rs:13:13
|
LL | let _ = v != [];
| ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()`
error: comparison to empty slice using `if let`
2023-07-27 06:40:22 -05:00
--> $DIR/comparison_to_empty.rs:14:8
|
LL | if let [] = &*v {}
| ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(*v).is_empty()`
error: comparison to empty slice using `if let`
2023-07-27 06:40:22 -05:00
--> $DIR/comparison_to_empty.rs:16:8
|
LL | if let [] = s {}
| ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
error: comparison to empty slice using `if let`
2023-07-27 06:40:22 -05:00
--> $DIR/comparison_to_empty.rs:17:8
|
LL | if let [] = &*s {}
| ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
error: comparison to empty slice using `if let`
2023-07-27 06:40:22 -05:00
--> $DIR/comparison_to_empty.rs:18:8
|
LL | if let [] = &*s && s == [] {}
| ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
error: comparison to empty slice
2023-07-27 06:40:22 -05:00
--> $DIR/comparison_to_empty.rs:18:24
|
LL | if let [] = &*s && s == [] {}
| ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
error: aborting due to 9 previous errors