rust/tests/ui/neg_cmp_op_on_partial_ord.stderr

30 lines
1.8 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
--> tests/ui/neg_cmp_op_on_partial_ord.rs:16:21
|
2018-12-27 09:57:55 -06:00
LL | let _not_less = !(a_value < another_value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::neg-cmp-op-on-partial-ord` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::neg_cmp_op_on_partial_ord)]`
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
--> tests/ui/neg_cmp_op_on_partial_ord.rs:21:30
|
2018-12-27 09:57:55 -06:00
LL | 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
--> tests/ui/neg_cmp_op_on_partial_ord.rs:25:24
|
2018-12-27 09:57:55 -06:00
LL | 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
--> tests/ui/neg_cmp_op_on_partial_ord.rs:29:33
|
2018-12-27 09:57:55 -06:00
LL | let _not_greater_or_equal = !(a_value >= another_value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors