1
1
error: use `std::ptr::eq` when comparing raw pointers
2
- --> tests/ui/ptr_eq.rs:19 :13
2
+ --> tests/ui/ptr_eq.rs:22 :13
3
3
|
4
4
LL | let _ = a as *const _ as usize == b as *const _ as usize;
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a, b)`
@@ -8,52 +8,58 @@ LL | let _ = a as *const _ as usize == b as *const _ as usize;
8
8
= help: to override `-D warnings` add `#[allow(clippy::ptr_eq)]`
9
9
10
10
error: use `std::ptr::eq` when comparing raw pointers
11
- --> tests/ui/ptr_eq.rs:21 :13
11
+ --> tests/ui/ptr_eq.rs:24 :13
12
12
|
13
13
LL | let _ = a as *const _ == b as *const _;
14
14
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a, b)`
15
15
16
16
error: use `std::ptr::eq` when comparing raw pointers
17
- --> tests/ui/ptr_eq.rs:23 :13
17
+ --> tests/ui/ptr_eq.rs:26 :13
18
18
|
19
19
LL | let _ = a.as_ptr() == b as *const _;
20
20
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a.as_ptr(), b as *const _)`
21
21
22
22
error: use `std::ptr::eq` when comparing raw pointers
23
- --> tests/ui/ptr_eq.rs:25 :13
23
+ --> tests/ui/ptr_eq.rs:28 :13
24
24
|
25
25
LL | let _ = a.as_ptr() == b.as_ptr();
26
26
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a.as_ptr(), b.as_ptr())`
27
27
28
28
error: use `std::ptr::eq` when comparing raw pointers
29
- --> tests/ui/ptr_eq.rs:36 :13
29
+ --> tests/ui/ptr_eq.rs:39 :13
30
30
|
31
31
LL | let _ = a.as_mut_ptr() == b as *mut [i32] as *mut _;
32
32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a.as_mut_ptr(), b as *mut [i32] as *mut _)`
33
33
34
34
error: use `std::ptr::eq` when comparing raw pointers
35
- --> tests/ui/ptr_eq.rs:38 :13
35
+ --> tests/ui/ptr_eq.rs:41 :13
36
36
|
37
37
LL | let _ = a.as_mut_ptr() == b.as_mut_ptr();
38
38
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(a.as_mut_ptr(), b.as_mut_ptr())`
39
39
40
40
error: use `std::ptr::eq` when comparing raw pointers
41
- --> tests/ui/ptr_eq.rs:45 :13
41
+ --> tests/ui/ptr_eq.rs:48 :13
42
42
|
43
43
LL | let _ = x as *const u32 == y as *mut u32 as *const u32;
44
44
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(x, y)`
45
45
46
46
error: use `std::ptr::eq` when comparing raw pointers
47
- --> tests/ui/ptr_eq.rs:48 :13
47
+ --> tests/ui/ptr_eq.rs:51 :13
48
48
|
49
49
LL | let _ = x as *const u32 != y as *mut u32 as *const u32;
50
50
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!std::ptr::eq(x, y)`
51
51
52
52
error: use `std::ptr::eq` when comparing raw pointers
53
- --> tests/ui/ptr_eq.rs:52 :23
53
+ --> tests/ui/ptr_eq.rs:55 :23
54
54
|
55
55
LL | let _issue14337 = main as *const () == main as *const ();
56
56
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(main as *const (), main as *const ())`
57
57
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
59
65
0 commit comments