rust-clippy/tests/ui/const_is_empty.stderr

125 lines
3.2 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:4:8
|
LL | if "".is_empty() {
| ^^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:4: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:7:8
|
LL | if "foobar".is_empty() {
| ^^^^^^^^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:7:8
|
LL | if "foobar".is_empty() {
| ^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:13:8
|
LL | if b"".is_empty() {
| ^^^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:13:8
|
LL | if b"".is_empty() {
| ^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:16:8
|
LL | if b"foobar".is_empty() {
| ^^^^^^^^^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:16:8
|
LL | if b"foobar".is_empty() {
| ^^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:33:8
|
LL | if empty2.is_empty() {
| ^^^^^^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:29:17
|
LL | let empty = "";
| ^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:36:8
|
LL | if non_empty2.is_empty() {
| ^^^^^^^^^^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:30:21
|
LL | let non_empty = "foobar";
| ^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:43:13
|
LL | let _ = value.is_empty();
| ^^^^^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:42:17
|
LL | let value = "foobar";
| ^^^^^^^^
error: this expression always evaluates to false
--> tests/ui/const_is_empty.rs:46:13
|
LL | let _ = x.is_empty();
| ^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:42:17
|
LL | let value = "foobar";
| ^^^^^^^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:48:13
|
LL | let _ = "".is_empty();
| ^^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:48:13
|
LL | let _ = "".is_empty();
| ^^
error: this expression always evaluates to true
--> tests/ui/const_is_empty.rs:50:13
|
LL | let _ = b"".is_empty();
| ^^^^^^^^^^^^^^
|
note: because its initialization value is constant
--> tests/ui/const_is_empty.rs:50:13
|
LL | let _ = b"".is_empty();
| ^^^
error: aborting due to 10 previous errors