mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-22 02:53:20 +00:00
19 lines
504 B
Text
19 lines
504 B
Text
|
error: this creates an owned instance just for comparison
|
||
|
--> $DIR/comparison_flip.rs:8:8
|
||
|
|
|
||
|
LL | if a.to_string() != "bar" {
|
||
|
| ^^^^^^^^^^^^^ help: try: `a`
|
||
|
|
|
||
|
= note: `-D clippy::cmp-owned` implied by `-D warnings`
|
||
|
|
||
|
error: this creates an owned instance just for comparison
|
||
|
--> $DIR/comparison_flip.rs:12:17
|
||
|
|
|
||
|
LL | if "bar" != a.to_string() {
|
||
|
| ---------^^^^^^^^^^^^^
|
||
|
| |
|
||
|
| help: try: `a != "bar"`
|
||
|
|
||
|
error: aborting due to 2 previous errors
|
||
|
|