about summary refs log tree commit diff
path: root/tests/ui/lint/ambiguous_wide_pointer_comparisons_suggestions.stderr
blob: 30d7683ef4b495e89f71e86b3e6b3f2413365c2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
  --> $DIR/ambiguous_wide_pointer_comparisons_suggestions.rs:8:13
   |
LL |     let _ = a == b;
   |             ^^^^^^
   |
   = note: `#[warn(ambiguous_wide_pointer_comparisons)]` on by default
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
   |
LL -     let _ = a == b;
LL +     let _ = std::ptr::addr_eq(a, b);
   |
help: use explicit `std::ptr::eq` method to compare metadata and addresses
   |
LL -     let _ = a == b;
LL +     let _ = std::ptr::eq(a, b);
   |

warning: 1 warning emitted