2024-02-20 11:35:13 +00:00
|
|
|
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
|
|
|
|
|
|
|
2024-07-09 22:30:26 +00:00
|
|
|
LL - let _ = a == b;
|
|
|
|
|
LL + let _ = std::ptr::addr_eq(a, b);
|
|
|
|
|
|
|
2024-02-20 11:35:13 +00:00
|
|
|
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
|
|
|
|
|
|
2024-07-09 22:30:26 +00:00
|
|
|
LL - let _ = a == b;
|
|
|
|
|
LL + let _ = std::ptr::eq(a, b);
|
|
|
|
|
|
|
2024-02-20 11:35:13 +00:00
|
|
|
|
|
|
|
|
warning: 1 warning emitted
|
|
|
|
|
|