mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
19 lines
603 B
Text
19 lines
603 B
Text
error: this creates an owned instance just for comparison
|
|
--> tests/ui/cmp_owned/comparison_flip.rs:6:8
|
|
|
|
|
LL | if a.to_string() != "bar" {
|
|
| ^^^^^^^^^^^^^ help: try: `a`
|
|
|
|
|
= note: `-D clippy::cmp-owned` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::cmp_owned)]`
|
|
|
|
error: this creates an owned instance just for comparison
|
|
--> tests/ui/cmp_owned/comparison_flip.rs:10:17
|
|
|
|
|
LL | if "bar" != a.to_string() {
|
|
| ---------^^^^^^^^^^^^^
|
|
| |
|
|
| help: try: `a != "bar"`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|