rust/tests/ui/lint/wide_pointer_comparisons.stderr

629 lines
23 KiB
Plaintext

warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:20: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 _ = std::ptr::addr_eq(a, b);
| ++++++++++++++++++ ~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:22:13
|
LL | let _ = a != b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(a, b);
| +++++++++++++++++++ ~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:24:13
|
LL | let _ = a < b;
| ^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>() < b.cast::<()>();
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:26:13
|
LL | let _ = a <= b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>() <= b.cast::<()>();
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:28:13
|
LL | let _ = a > b;
| ^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>() > b.cast::<()>();
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:30:13
|
LL | let _ = a >= b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>() >= b.cast::<()>();
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:33:13
|
LL | let _ = PartialEq::eq(&a, &b);
| ^^^^^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(a, b);
| ~~~~~~~~~~~~~~~~~~ ~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:35:13
|
LL | let _ = PartialEq::ne(&a, &b);
| ^^^^^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(a, b);
| ~~~~~~~~~~~~~~~~~~~ ~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:37:13
|
LL | let _ = a.eq(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(a, b);
| ++++++++++++++++++ ~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:39:13
|
LL | let _ = a.ne(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(a, b);
| +++++++++++++++++++ ~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:41:13
|
LL | let _ = a.cmp(&b);
| ^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>().cmp(&b.cast::<()>());
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:43:13
|
LL | let _ = a.partial_cmp(&b);
| ^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>().partial_cmp(&b.cast::<()>());
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:45:13
|
LL | let _ = a.le(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>().le(&b.cast::<()>());
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:47:13
|
LL | let _ = a.lt(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>().lt(&b.cast::<()>());
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:49:13
|
LL | let _ = a.ge(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>().ge(&b.cast::<()>());
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:51:13
|
LL | let _ = a.gt(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>().gt(&b.cast::<()>());
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:57:17
|
LL | let _ = a == b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(a.as_ptr(), b.as_ptr());
| ++++++++++++++++++ ~~~~~~~~~~ ++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:59:17
|
LL | let _ = a >= b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.as_ptr().cast::<()>() >= b.as_ptr().cast::<()>();
| ++++++++++++++++++++++ ++++++++++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:61:17
|
LL | let _ = &a == &b;
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(a.as_ptr(), b.as_ptr());
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:70:17
|
LL | let _ = a == b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(*a, *b);
| +++++++++++++++++++ ~~~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:72:17
|
LL | let _ = a != b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(*a, *b);
| ++++++++++++++++++++ ~~~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:74:17
|
LL | let _ = a < b;
| ^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>() < (*b).cast::<()>();
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:76:17
|
LL | let _ = a <= b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>() <= (*b).cast::<()>();
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:78:17
|
LL | let _ = a > b;
| ^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>() > (*b).cast::<()>();
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:80:17
|
LL | let _ = a >= b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>() >= (*b).cast::<()>();
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:83:17
|
LL | let _ = PartialEq::eq(a, b);
| ^^^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(*a, *b);
| ~~~~~~~~~~~~~~~~~~~ ~~~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:85:17
|
LL | let _ = PartialEq::ne(a, b);
| ^^^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(*a, *b);
| ~~~~~~~~~~~~~~~~~~~~ ~~~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:87:17
|
LL | let _ = PartialEq::eq(&a, &b);
| ^^^^^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(*a, *b);
| ~~~~~~~~~~~~~~~~~~~ ~~~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:89:17
|
LL | let _ = PartialEq::ne(&a, &b);
| ^^^^^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(*a, *b);
| ~~~~~~~~~~~~~~~~~~~~ ~~~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:91:17
|
LL | let _ = a.eq(b);
| ^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(*a, *b);
| +++++++++++++++++++ ~~~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:93:17
|
LL | let _ = a.ne(b);
| ^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(*a, *b);
| ++++++++++++++++++++ ~~~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:95:17
|
LL | let _ = a.cmp(&b);
| ^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>().cmp(&(*b).cast::<()>());
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:97:17
|
LL | let _ = a.partial_cmp(&b);
| ^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>().partial_cmp(&(*b).cast::<()>());
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:99:17
|
LL | let _ = a.le(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>().le(&(*b).cast::<()>());
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:101:17
|
LL | let _ = a.lt(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>().lt(&(*b).cast::<()>());
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:103:17
|
LL | let _ = a.ge(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>().ge(&(*b).cast::<()>());
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:105:17
|
LL | let _ = a.gt(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = (*a).cast::<()>().gt(&(*b).cast::<()>());
| ++ ++++++++++++++ ++ ++++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:110:13
|
LL | let _ = s == s;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(s, s);
| ++++++++++++++++++ ~ +
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
LL | let _ = std::ptr::eq(s, s);
| +++++++++++++ ~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:114:13
|
LL | let _ = s == s;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(s, s);
| ++++++++++++++++++ ~ +
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
LL | let _ = std::ptr::eq(s, s);
| +++++++++++++ ~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:118:17
|
LL | let _ = a == b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(a, b);
| ++++++++++++++++++ ~ +
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
LL | let _ = std::ptr::eq(a, b);
| +++++++++++++ ~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:120:17
|
LL | let _ = a != b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(a, b);
| +++++++++++++++++++ ~ +
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
LL | let _ = !std::ptr::eq(a, b);
| ++++++++++++++ ~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:122:17
|
LL | let _ = a < b;
| ^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>() < b.cast::<()>();
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:124:17
|
LL | let _ = a <= b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>() <= b.cast::<()>();
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:126:17
|
LL | let _ = a > b;
| ^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>() > b.cast::<()>();
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:128:17
|
LL | let _ = a >= b;
| ^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = a.cast::<()>() >= b.cast::<()>();
| +++++++++++++ +++++++++++++
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:131:17
|
LL | let _ = PartialEq::eq(&a, &b);
| ^^^^^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(a, b);
| ~~~~~~~~~~~~~~~~~~ ~ ~
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
LL | let _ = std::ptr::eq(a, b);
| ~~~~~~~~~~~~~ ~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:133:17
|
LL | let _ = PartialEq::ne(&a, &b);
| ^^^^^^^^^^^^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(a, b);
| ~~~~~~~~~~~~~~~~~~~ ~ ~
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
LL | let _ = !std::ptr::eq(a, b);
| ~~~~~~~~~~~~~~ ~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:135:17
|
LL | let _ = a.eq(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = std::ptr::addr_eq(a, b);
| ++++++++++++++++++ ~ ~
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
LL | let _ = std::ptr::eq(a, b);
| +++++++++++++ ~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:137:17
|
LL | let _ = a.ne(&b);
| ^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | let _ = !std::ptr::addr_eq(a, b);
| +++++++++++++++++++ ~ ~
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
LL | let _ = !std::ptr::eq(a, b);
| ++++++++++++++ ~ ~
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:142:9
|
LL | &*a == &*b
| ^^^^^^^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | std::ptr::addr_eq(*a, *b)
| ~~~~~~~~~~~~~~~~~~ ~ +
help: use explicit `std::ptr::eq` method to compare metadata and addresses
|
LL | std::ptr::eq(*a, *b)
| ~~~~~~~~~~~~~ ~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:153:14
|
LL | cmp!(a, b);
| ^^^^
|
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | cmp!(std::ptr::addr_eq(a, b));
| ++++++++++++++++++ ~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:159:39
|
LL | ($a:ident, $b:ident) => { $a == $b }
| ^^^^^^^^
...
LL | cmp!(a, b);
| ---------- in this macro invocation
|
= note: this warning originates in the macro `cmp` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
|
LL | ($a:ident, $b:ident) => { std::ptr::addr_eq($a, $b) }
| ++++++++++++++++++ ~ +
warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
--> $DIR/wide_pointer_comparisons.rs:169:37
|
LL | ($a:expr, $b:expr) => { $a == $b }
| ^^
...
LL | cmp!(&a, &b);
| ------------ in this macro invocation
|
= help: use explicit `std::ptr::eq` method to compare metadata and addresses
= help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
= note: this warning originates in the macro `cmp` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: 53 warnings emitted