rust/tests/ui/neg_cmp_op_on_partial_ord.stderr

29 lines
1.7 KiB
Plaintext
Raw Normal View History

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.
2018-10-06 11:18:06 -05:00
--> $DIR/neg_cmp_op_on_partial_ord.rs:29:21
|
2018-10-06 11:18:06 -05:00
29 | let _not_less = !(a_value < another_value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::neg-cmp-op-on-partial-ord` implied by `-D warnings`
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.
2018-10-06 11:18:06 -05:00
--> $DIR/neg_cmp_op_on_partial_ord.rs:32:30
|
2018-10-06 11:18:06 -05:00
32 | let _not_less_or_equal = !(a_value <= another_value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
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.
2018-10-06 11:18:06 -05:00
--> $DIR/neg_cmp_op_on_partial_ord.rs:35:24
|
2018-10-06 11:18:06 -05:00
35 | let _not_greater = !(a_value > another_value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
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.
2018-10-06 11:18:06 -05:00
--> $DIR/neg_cmp_op_on_partial_ord.rs:38:33
|
2018-10-06 11:18:06 -05:00
38 | let _not_greater_or_equal = !(a_value >= another_value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors