summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/cmp_owned/comparison_flip.stderr
blob: e4d0d822bb1e341aa8dc0fc9bfbee2e923558b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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