Skip to content

Commit 5adf3ef

Browse files
authored
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 ```
2 parents 7c68a8d + 1c3454a commit 5adf3ef

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

library/core/src/cmp.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,6 @@ pub trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized {
14491449
/// check `==` and `<` separately to do rather than needing to calculate
14501450
/// (then optimize out) the three-way `Ordering` result.
14511451
#[inline]
1452-
#[must_use]
14531452
// Added to improve the behaviour of tuples; not necessarily stabilization-track.
14541453
#[unstable(feature = "partial_ord_chaining_methods", issue = "none")]
14551454
#[doc(hidden)]
@@ -1459,7 +1458,6 @@ pub trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized {
14591458

14601459
/// Same as `__chaining_lt`, but for `<=` instead of `<`.
14611460
#[inline]
1462-
#[must_use]
14631461
#[unstable(feature = "partial_ord_chaining_methods", issue = "none")]
14641462
#[doc(hidden)]
14651463
fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool> {
@@ -1468,7 +1466,6 @@ pub trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized {
14681466

14691467
/// Same as `__chaining_lt`, but for `>` instead of `<`.
14701468
#[inline]
1471-
#[must_use]
14721469
#[unstable(feature = "partial_ord_chaining_methods", issue = "none")]
14731470
#[doc(hidden)]
14741471
fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool> {
@@ -1477,7 +1474,6 @@ pub trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized {
14771474

14781475
/// Same as `__chaining_lt`, but for `>=` instead of `<`.
14791476
#[inline]
1480-
#[must_use]
14811477
#[unstable(feature = "partial_ord_chaining_methods", issue = "none")]
14821478
#[doc(hidden)]
14831479
fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool> {

0 commit comments

Comments
 (0)