|
| 1 | +error: this expression always evaluates to true |
| 2 | + --> tests/ui/const_is_empty.rs:4:8 |
| 3 | + | |
| 4 | +LL | if "".is_empty() { |
| 5 | + | ^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: because its initialization value is constant |
| 8 | + --> tests/ui/const_is_empty.rs:4:8 |
| 9 | + | |
| 10 | +LL | if "".is_empty() { |
| 11 | + | ^^ |
| 12 | + = note: `-D clippy::const-is-empty` implied by `-D warnings` |
| 13 | + = help: to override `-D warnings` add `#[allow(clippy::const_is_empty)]` |
| 14 | + |
| 15 | +error: this expression always evaluates to false |
| 16 | + --> tests/ui/const_is_empty.rs:7:8 |
| 17 | + | |
| 18 | +LL | if "foobar".is_empty() { |
| 19 | + | ^^^^^^^^^^^^^^^^^^^ |
| 20 | + | |
| 21 | +note: because its initialization value is constant |
| 22 | + --> tests/ui/const_is_empty.rs:7:8 |
| 23 | + | |
| 24 | +LL | if "foobar".is_empty() { |
| 25 | + | ^^^^^^^^ |
| 26 | + |
| 27 | +error: this expression always evaluates to true |
| 28 | + --> tests/ui/const_is_empty.rs:13:8 |
| 29 | + | |
| 30 | +LL | if b"".is_empty() { |
| 31 | + | ^^^^^^^^^^^^^^ |
| 32 | + | |
| 33 | +note: because its initialization value is constant |
| 34 | + --> tests/ui/const_is_empty.rs:13:8 |
| 35 | + | |
| 36 | +LL | if b"".is_empty() { |
| 37 | + | ^^^ |
| 38 | + |
| 39 | +error: this expression always evaluates to false |
| 40 | + --> tests/ui/const_is_empty.rs:16:8 |
| 41 | + | |
| 42 | +LL | if b"foobar".is_empty() { |
| 43 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 44 | + | |
| 45 | +note: because its initialization value is constant |
| 46 | + --> tests/ui/const_is_empty.rs:16:8 |
| 47 | + | |
| 48 | +LL | if b"foobar".is_empty() { |
| 49 | + | ^^^^^^^^^ |
| 50 | + |
| 51 | +error: this expression always evaluates to true |
| 52 | + --> tests/ui/const_is_empty.rs:33:8 |
| 53 | + | |
| 54 | +LL | if empty2.is_empty() { |
| 55 | + | ^^^^^^^^^^^^^^^^^ |
| 56 | + | |
| 57 | +note: because its initialization value is constant |
| 58 | + --> tests/ui/const_is_empty.rs:29:17 |
| 59 | + | |
| 60 | +LL | let empty = ""; |
| 61 | + | ^^ |
| 62 | + |
| 63 | +error: this expression always evaluates to false |
| 64 | + --> tests/ui/const_is_empty.rs:36:8 |
| 65 | + | |
| 66 | +LL | if non_empty2.is_empty() { |
| 67 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 68 | + | |
| 69 | +note: because its initialization value is constant |
| 70 | + --> tests/ui/const_is_empty.rs:30:21 |
| 71 | + | |
| 72 | +LL | let non_empty = "foobar"; |
| 73 | + | ^^^^^^^^ |
| 74 | + |
| 75 | +error: this expression always evaluates to false |
| 76 | + --> tests/ui/const_is_empty.rs:43:13 |
| 77 | + | |
| 78 | +LL | let _ = value.is_empty(); |
| 79 | + | ^^^^^^^^^^^^^^^^ |
| 80 | + | |
| 81 | +note: because its initialization value is constant |
| 82 | + --> tests/ui/const_is_empty.rs:42:17 |
| 83 | + | |
| 84 | +LL | let value = "foobar"; |
| 85 | + | ^^^^^^^^ |
| 86 | + |
| 87 | +error: this expression always evaluates to false |
| 88 | + --> tests/ui/const_is_empty.rs:46:13 |
| 89 | + | |
| 90 | +LL | let _ = x.is_empty(); |
| 91 | + | ^^^^^^^^^^^^ |
| 92 | + | |
| 93 | +note: because its initialization value is constant |
| 94 | + --> tests/ui/const_is_empty.rs:42:17 |
| 95 | + | |
| 96 | +LL | let value = "foobar"; |
| 97 | + | ^^^^^^^^ |
| 98 | + |
| 99 | +error: this expression always evaluates to true |
| 100 | + --> tests/ui/const_is_empty.rs:48:13 |
| 101 | + | |
| 102 | +LL | let _ = "".is_empty(); |
| 103 | + | ^^^^^^^^^^^^^ |
| 104 | + | |
| 105 | +note: because its initialization value is constant |
| 106 | + --> tests/ui/const_is_empty.rs:48:13 |
| 107 | + | |
| 108 | +LL | let _ = "".is_empty(); |
| 109 | + | ^^ |
| 110 | + |
| 111 | +error: this expression always evaluates to true |
| 112 | + --> tests/ui/const_is_empty.rs:50:13 |
| 113 | + | |
| 114 | +LL | let _ = b"".is_empty(); |
| 115 | + | ^^^^^^^^^^^^^^ |
| 116 | + | |
| 117 | +note: because its initialization value is constant |
| 118 | + --> tests/ui/const_is_empty.rs:50:13 |
| 119 | + | |
| 120 | +LL | let _ = b"".is_empty(); |
| 121 | + | ^^^ |
| 122 | + |
| 123 | +error: aborting due to 10 previous errors |
| 124 | + |
0 commit comments