Skip to content

Commit 5357f53

Browse files
committed
neg-cmp-op-on-partial-ord: make lint adhere to lint message convention
1 parent f3b6040 commit 5357f53

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clippy_lints/src/neg_cmp_op_on_partial_ord.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl<'tcx> LateLintPass<'tcx> for NoNegCompOpForPartialOrd {
7979
cx,
8080
NEG_CMP_OP_ON_PARTIAL_ORD,
8181
expr.span,
82-
"The use of negated comparison operators on partially ordered \
82+
"the use of negated comparison operators on partially ordered \
8383
types produces code that is hard to read and refactor. Please \
8484
consider using the `partial_cmp` method instead, to make it \
8585
clear that the two values could be incomparable."

tests/ui/neg_cmp_op_on_partial_ord.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
error: The use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
1+
error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
22
--> $DIR/neg_cmp_op_on_partial_ord.rs:16:21
33
|
44
LL | let _not_less = !(a_value < another_value);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::neg-cmp-op-on-partial-ord` implied by `-D warnings`
88

9-
error: The use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
9+
error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
1010
--> $DIR/neg_cmp_op_on_partial_ord.rs:19:30
1111
|
1212
LL | let _not_less_or_equal = !(a_value <= another_value);
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

15-
error: The use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
15+
error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
1616
--> $DIR/neg_cmp_op_on_partial_ord.rs:22:24
1717
|
1818
LL | let _not_greater = !(a_value > another_value);
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2020

21-
error: The use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
21+
error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
2222
--> $DIR/neg_cmp_op_on_partial_ord.rs:25:33
2323
|
2424
LL | let _not_greater_or_equal = !(a_value >= another_value);

0 commit comments

Comments
 (0)