diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-07-04 05:47:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-04 05:47:26 +0200 |
| commit | 5adf3ef3392600acc55a11054d2a75bf7f40a13e (patch) | |
| tree | bafaf1272c508475f3e5feba0e624f75c2fa9c54 | |
| parent | 7c68a8db3e069907d3c93bb7e6cee0cafb003d4f (diff) | |
| parent | 1c3454af55316c11cef651a14e0cdf8b3bb0cb56 (diff) | |
| download | rust-5adf3ef3392600acc55a11054d2a75bf7f40a13e.tar.gz rust-5adf3ef3392600acc55a11054d2a75bf7f40a13e.zip | |
Rollup merge of #143370 - hkBst:clippy-fix-4, r=tgross35
remove redundant #[must_use]
Fixes these clippy warnings:
```
warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
--> library/core/src/cmp.rs:1456:5
|
1456 | fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: either add some descriptive message or remove the attribute
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use
= note: `-D clippy::double-must-use` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::double_must_use)]`
warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
--> library/core/src/cmp.rs:1465:5
|
1465 | fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: either add some descriptive message or remove the attribute
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use
warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
--> library/core/src/cmp.rs:1474:5
|
1474 | fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: either add some descriptive message or remove the attribute
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use
warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
--> library/core/src/cmp.rs:1483:5
|
1483 | fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: either add some descriptive message or remove the attribute
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use
```
| -rw-r--r-- | library/core/src/cmp.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index 0aa8f47462d..b1ca3701fa5 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -1449,7 +1449,6 @@ pub trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized { /// check `==` and `<` separately to do rather than needing to calculate /// (then optimize out) the three-way `Ordering` result. #[inline] - #[must_use] // Added to improve the behaviour of tuples; not necessarily stabilization-track. #[unstable(feature = "partial_ord_chaining_methods", issue = "none")] #[doc(hidden)] @@ -1459,7 +1458,6 @@ pub trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized { /// Same as `__chaining_lt`, but for `<=` instead of `<`. #[inline] - #[must_use] #[unstable(feature = "partial_ord_chaining_methods", issue = "none")] #[doc(hidden)] fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool> { @@ -1468,7 +1466,6 @@ pub trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized { /// Same as `__chaining_lt`, but for `>` instead of `<`. #[inline] - #[must_use] #[unstable(feature = "partial_ord_chaining_methods", issue = "none")] #[doc(hidden)] fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool> { @@ -1477,7 +1474,6 @@ pub trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized { /// Same as `__chaining_lt`, but for `>=` instead of `<`. #[inline] - #[must_use] #[unstable(feature = "partial_ord_chaining_methods", issue = "none")] #[doc(hidden)] fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool> { |
