Skip to content

Commit c8d1ac9

Browse files
committed
Remove more #[must_use] from portable-simd
warning: `#[must_use]` attribute cannot be used on trait methods in impl blocks --> crates/core_simd/src/masks/bitmask.rs:173:5 | 173 | #[must_use = "method returns a new mask and does not mutate the original value"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = help: `#[must_use]` can be applied to data types, foreign functions, functions, inherent methods, provided trait methods, required trait methods, traits, and unions = note: `#[warn(unused_attributes)]` (part of `#[warn(unused)]`) on by default warning: `#[must_use]` attribute cannot be used on trait methods in impl blocks --> crates/core_simd/src/masks/bitmask.rs:190:5 | 190 | #[must_use = "method returns a new mask and does not mutate the original value"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = help: `#[must_use]` can be applied to data types, foreign functions, functions, inherent methods, provided trait methods, required trait methods, traits, and unions warning: `#[must_use]` attribute cannot be used on trait methods in impl blocks --> crates/core_simd/src/masks/bitmask.rs:206:5 | 206 | #[must_use = "method returns a new mask and does not mutate the original value"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = help: `#[must_use]` can be applied to data types, foreign functions, functions, inherent methods, provided trait methods, required trait methods, traits, and unions warning: `#[must_use]` attribute cannot be used on trait methods in impl blocks --> crates/core_simd/src/masks/bitmask.rs:222:5 | 222 | #[must_use = "method returns a new mask and does not mutate the original value"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = help: `#[must_use]` can be applied to data types, foreign functions, functions, inherent methods, provided trait methods, required trait methods, traits, and unions
1 parent 25d319a commit c8d1ac9

File tree

1 file changed

+0
-4
lines changed
  • library/portable-simd/crates/core_simd/src/masks

1 file changed

+0
-4
lines changed

library/portable-simd/crates/core_simd/src/masks/bitmask.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ where
170170
{
171171
type Output = Self;
172172
#[inline]
173-
#[must_use = "method returns a new mask and does not mutate the original value"]
174173
fn bitand(mut self, rhs: Self) -> Self {
175174
for (l, r) in self.0.as_mut().iter_mut().zip(rhs.0.as_ref().iter()) {
176175
*l &= r;
@@ -187,7 +186,6 @@ where
187186
{
188187
type Output = Self;
189188
#[inline]
190-
#[must_use = "method returns a new mask and does not mutate the original value"]
191189
fn bitor(mut self, rhs: Self) -> Self {
192190
for (l, r) in self.0.as_mut().iter_mut().zip(rhs.0.as_ref().iter()) {
193191
*l |= r;
@@ -203,7 +201,6 @@ where
203201
{
204202
type Output = Self;
205203
#[inline]
206-
#[must_use = "method returns a new mask and does not mutate the original value"]
207204
fn bitxor(mut self, rhs: Self) -> Self::Output {
208205
for (l, r) in self.0.as_mut().iter_mut().zip(rhs.0.as_ref().iter()) {
209206
*l ^= r;
@@ -219,7 +216,6 @@ where
219216
{
220217
type Output = Self;
221218
#[inline]
222-
#[must_use = "method returns a new mask and does not mutate the original value"]
223219
fn not(mut self) -> Self::Output {
224220
for x in self.0.as_mut() {
225221
*x = !*x;

0 commit comments

Comments
 (0)