2022-01-17 06:29:07 -06:00
|
|
|
error: this creates an owned instance just for comparison
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/comparison_flip.rs:6:8
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
|
|
|
LL | if a.to_string() != "bar" {
|
|
|
|
| ^^^^^^^^^^^^^ help: try: `a`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::cmp-owned` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::cmp_owned)]`
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
|
|
error: this creates an owned instance just for comparison
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/comparison_flip.rs:10:17
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
|
|
|
LL | if "bar" != a.to_string() {
|
|
|
|
| ---------^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: try: `a != "bar"`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|