mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
161 lines
4.5 KiB
Text
161 lines
4.5 KiB
Text
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:5:8
|
|
|
|
|
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:8:8
|
|
|
|
|
LL | if "foobar".is_empty() {
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:14:8
|
|
|
|
|
LL | if b"".is_empty() {
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:17:8
|
|
|
|
|
LL | if b"foobar".is_empty() {
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:34:8
|
|
|
|
|
LL | if empty2.is_empty() {
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:37:8
|
|
|
|
|
LL | if non_empty2.is_empty() {
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:59:13
|
|
|
|
|
LL | let _ = EMPTY_STR.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:61:13
|
|
|
|
|
LL | let _ = NON_EMPTY_STR.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:63:13
|
|
|
|
|
LL | let _ = EMPTY_BSTR.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:65:13
|
|
|
|
|
LL | let _ = NON_EMPTY_BSTR.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:67:13
|
|
|
|
|
LL | let _ = EMPTY_ARRAY.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:69:13
|
|
|
|
|
LL | let _ = EMPTY_ARRAY_REPEAT.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:71:13
|
|
|
|
|
LL | let _ = EMPTY_U8_SLICE.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:73:13
|
|
|
|
|
LL | let _ = NON_EMPTY_U8_SLICE.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:75:13
|
|
|
|
|
LL | let _ = NON_EMPTY_ARRAY.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:77:13
|
|
|
|
|
LL | let _ = NON_EMPTY_ARRAY_REPEAT.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:79:13
|
|
|
|
|
LL | let _ = EMPTY_REF_ARRAY.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:81:13
|
|
|
|
|
LL | let _ = NON_EMPTY_REF_ARRAY.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:83:13
|
|
|
|
|
LL | let _ = EMPTY_SLICE.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:85:13
|
|
|
|
|
LL | let _ = NON_EMPTY_SLICE.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:87:13
|
|
|
|
|
LL | let _ = NON_EMPTY_SLICE_REPEAT.is_empty();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:93:13
|
|
|
|
|
LL | let _ = value.is_empty();
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to false
|
|
--> tests/ui/const_is_empty.rs:96:13
|
|
|
|
|
LL | let _ = x.is_empty();
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:98:13
|
|
|
|
|
LL | let _ = "".is_empty();
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:100:13
|
|
|
|
|
LL | let _ = b"".is_empty();
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: this expression always evaluates to true
|
|
--> tests/ui/const_is_empty.rs:154:13
|
|
|
|
|
LL | let _ = val.is_empty();
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 26 previous errors
|
|
|