11error: use `std::ptr::eq` when comparing raw pointers
2- --> tests/ui/ptr_eq.rs:19 :13
2+ --> tests/ui/ptr_eq.rs:22 :13
33 |
44LL | let _ = a as *const _ as usize == b as *const _ as usize;
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a, b)`
@@ -8,52 +8,58 @@ LL | let _ = a as *const _ as usize == b as *const _ as usize;
88 = help: to override `-D warnings` add `#[allow(clippy::ptr_eq)]`
99
1010error: use `std::ptr::eq` when comparing raw pointers
11- --> tests/ui/ptr_eq.rs:21 :13
11+ --> tests/ui/ptr_eq.rs:24 :13
1212 |
1313LL | let _ = a as *const _ == b as *const _;
1414 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a, b)`
1515
1616error: use `std::ptr::eq` when comparing raw pointers
17- --> tests/ui/ptr_eq.rs:23 :13
17+ --> tests/ui/ptr_eq.rs:26 :13
1818 |
1919LL | let _ = a.as_ptr() == b as *const _;
2020 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a.as_ptr(), b as *const _)`
2121
2222error: use `std::ptr::eq` when comparing raw pointers
23- --> tests/ui/ptr_eq.rs:25 :13
23+ --> tests/ui/ptr_eq.rs:28 :13
2424 |
2525LL | let _ = a.as_ptr() == b.as_ptr();
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a.as_ptr(), b.as_ptr())`
2727
2828error: use `std::ptr::eq` when comparing raw pointers
29- --> tests/ui/ptr_eq.rs:36 :13
29+ --> tests/ui/ptr_eq.rs:39 :13
3030 |
3131LL | let _ = a.as_mut_ptr() == b as *mut [i32] as *mut _;
3232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a.as_mut_ptr(), b as *mut [i32] as *mut _)`
3333
3434error: use `std::ptr::eq` when comparing raw pointers
35- --> tests/ui/ptr_eq.rs:38 :13
35+ --> tests/ui/ptr_eq.rs:41 :13
3636 |
3737LL | let _ = a.as_mut_ptr() == b.as_mut_ptr();
3838 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a.as_mut_ptr(), b.as_mut_ptr())`
3939
4040error: use `std::ptr::eq` when comparing raw pointers
41- --> tests/ui/ptr_eq.rs:45 :13
41+ --> tests/ui/ptr_eq.rs:48 :13
4242 |
4343LL | let _ = x as *const u32 == y as *mut u32 as *const u32;
4444 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(x, y)`
4545
4646error: use `std::ptr::eq` when comparing raw pointers
47- --> tests/ui/ptr_eq.rs:48 :13
47+ --> tests/ui/ptr_eq.rs:51 :13
4848 |
4949LL | let _ = x as *const u32 != y as *mut u32 as *const u32;
5050 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!std::ptr::eq(x, y)`
5151
5252error: use `std::ptr::eq` when comparing raw pointers
53- --> tests/ui/ptr_eq.rs:52 :23
53+ --> tests/ui/ptr_eq.rs:55 :23
5454 |
5555LL | let _issue14337 = main as *const () == main as *const ();
5656 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(main as *const (), main as *const ())`
5757
58- error: aborting due to 9 previous errors
58+ error: use `std::ptr::eq` when comparing raw pointers
59+ --> tests/ui/ptr_eq.rs:59:13
60+ |
61+ LL | let _ = mac!(cast a) as *const _ == mac!(cast b) as *const _;
62+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(mac!(cast a), mac!(cast b))`
63+
64+ error: aborting due to 10 previous errors
5965
0 commit comments