]> git.lizzy.rs Git - rust.git/blob - tests/ui/neg_cmp_op_on_partial_ord.stderr
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / neg_cmp_op_on_partial_ord.stderr
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.
2   --> $DIR/neg_cmp_op_on_partial_ord.rs:15:21
3    |
4 LL |     let _not_less = !(a_value < another_value);
5    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::neg-cmp-op-on-partial-ord` implied by `-D warnings`
8
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.
10   --> $DIR/neg_cmp_op_on_partial_ord.rs:18:30
11    |
12 LL |     let _not_less_or_equal = !(a_value <= another_value);
13    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
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.
16   --> $DIR/neg_cmp_op_on_partial_ord.rs:21:24
17    |
18 LL |     let _not_greater = !(a_value > another_value);
19    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
20
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.
22   --> $DIR/neg_cmp_op_on_partial_ord.rs:24:33
23    |
24 LL |     let _not_greater_or_equal = !(a_value >= another_value);
25    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27 error: aborting due to 4 previous errors
28