mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
46 lines
1.5 KiB
Text
46 lines
1.5 KiB
Text
error: this creates an owned instance just for comparison
|
|
--> $DIR/asymmetric_partial_eq.rs:47:12
|
|
|
|
|
LL | if borrowed.to_owned() == owned {}
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `borrowed`
|
|
|
|
|
= note: `-D clippy::cmp-owned` implied by `-D warnings`
|
|
|
|
error: this creates an owned instance just for comparison
|
|
--> $DIR/asymmetric_partial_eq.rs:48:21
|
|
|
|
|
LL | if owned == borrowed.to_owned() {}
|
|
| ---------^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: try: `borrowed == owned`
|
|
|
|
error: this creates an owned instance just for comparison
|
|
--> $DIR/asymmetric_partial_eq.rs:66:21
|
|
|
|
|
LL | if owned == borrowed.to_owned() {}
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `borrowed`
|
|
|
|
error: this creates an owned instance just for comparison
|
|
--> $DIR/asymmetric_partial_eq.rs:67:12
|
|
|
|
|
LL | if borrowed.to_owned() == owned {}
|
|
| ^^^^^^^^^^^^^^^^^^^---------
|
|
| |
|
|
| help: try: `owned == borrowed`
|
|
|
|
error: this creates an owned instance just for comparison
|
|
--> $DIR/asymmetric_partial_eq.rs:93:20
|
|
|
|
|
LL | if "Hi" == borrowed.to_string() {}
|
|
| --------^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: try: `borrowed == "Hi"`
|
|
|
|
error: this creates an owned instance just for comparison
|
|
--> $DIR/asymmetric_partial_eq.rs:94:12
|
|
|
|
|
LL | if borrowed.to_string() == "Hi" {}
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try: `borrowed`
|
|
|
|
error: aborting due to 6 previous errors
|
|
|