rust-clippy/tests/ui/const_is_empty.stderr

162 lines
4.5 KiB
Text
Raw Normal View History

2024-02-19 22:30:17 +00:00
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:6:8
2024-02-19 22:30:17 +00:00
|
LL | if "".is_empty() {
| ^^^^^^^^^^^^^
|
= note: `-D clippy::const-is-empty` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::const_is_empty)]`
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:9:8
2024-02-19 22:30:17 +00:00
|
LL | if "foobar".is_empty() {
| ^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:15:8
2024-02-19 22:30:17 +00:00
|
LL | if b"".is_empty() {
| ^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:18:8
2024-02-19 22:30:17 +00:00
|
LL | if b"foobar".is_empty() {
| ^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:35:8
2024-02-19 22:30:17 +00:00
|
LL | if empty2.is_empty() {
| ^^^^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:38:8
2024-02-19 22:30:17 +00:00
|
LL | if non_empty2.is_empty() {
| ^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:60:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = EMPTY_STR.is_empty();
| ^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:62:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = NON_EMPTY_STR.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:64:13
|
LL | let _ = EMPTY_BSTR.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^
2024-02-19 22:30:17 +00:00
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:66:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = NON_EMPTY_BSTR.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:68:13
|
LL | let _ = EMPTY_ARRAY.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:70:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = EMPTY_ARRAY_REPEAT.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:72:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = EMPTY_U8_SLICE.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-19 22:30:17 +00:00
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:74:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = NON_EMPTY_U8_SLICE.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:76:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = NON_EMPTY_ARRAY.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:78:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = NON_EMPTY_ARRAY_REPEAT.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-19 22:30:17 +00:00
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:80:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = EMPTY_REF_ARRAY.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:82:13
|
LL | let _ = NON_EMPTY_REF_ARRAY.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:84:13
|
LL | let _ = EMPTY_SLICE.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:86:13
|
LL | let _ = NON_EMPTY_SLICE.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:88:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = NON_EMPTY_SLICE_REPEAT.is_empty();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:94:13
|
LL | let _ = value.is_empty();
| ^^^^^^^^^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:97:13
|
LL | let _ = x.is_empty();
| ^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:99:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = "".is_empty();
| ^^^^^^^^^^^^^
2024-02-19 22:30:17 +00:00
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:101:13
2024-02-19 22:30:17 +00:00
|
LL | let _ = b"".is_empty();
| ^^^^^^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:155:13
|
LL | let _ = val.is_empty();
| ^^^^^^^^^^^^^^
error: aborting due to 26 previous errors
2024-02-19 22:30:17 +00:00