1
1
error: manual creation of a dangling pointer
2
- --> tests/ui/manual_dangling_ptr.rs:8 :13
2
+ --> tests/ui/manual_dangling_ptr.rs:7 :13
3
3
|
4
4
LL | let _ = 4 as *const u32;
5
5
| ^^^^^^^^^^^^^^^ help: use: `std::ptr::dangling::<u32>()`
@@ -14,43 +14,43 @@ LL | let _ = 8 as *mut f64;
14
14
| ^^^^^^^^^^^^^ help: use: `std::ptr::dangling_mut::<f64>()`
15
15
16
16
error: manual creation of a dangling pointer
17
- --> tests/ui/manual_dangling_ptr.rs:10 :24
17
+ --> tests/ui/manual_dangling_ptr.rs:11 :24
18
18
|
19
19
LL | let _: *const u8 = 1 as *const _;
20
20
| ^^^^^^^^^^^^^ help: use: `std::ptr::dangling()`
21
21
22
22
error: manual creation of a dangling pointer
23
- --> tests/ui/manual_dangling_ptr.rs:12 :13
23
+ --> tests/ui/manual_dangling_ptr.rs:14 :13
24
24
|
25
25
LL | let _ = mem::align_of::<u32>() as *const u32;
26
26
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `std::ptr::dangling::<u32>()`
27
27
28
28
error: manual creation of a dangling pointer
29
- --> tests/ui/manual_dangling_ptr.rs:13 :13
29
+ --> tests/ui/manual_dangling_ptr.rs:16 :13
30
30
|
31
31
LL | let _ = mem::align_of::<u64>() as *mut u64;
32
32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `std::ptr::dangling_mut::<u64>()`
33
33
34
34
error: manual creation of a dangling pointer
35
- --> tests/ui/manual_dangling_ptr.rs:15 :9
35
+ --> tests/ui/manual_dangling_ptr.rs:19 :9
36
36
|
37
37
LL | foo(4 as *const _, 8 as *mut _);
38
38
| ^^^^^^^^^^^^^ help: use: `std::ptr::dangling()`
39
39
40
40
error: manual creation of a dangling pointer
41
- --> tests/ui/manual_dangling_ptr.rs:15 :24
41
+ --> tests/ui/manual_dangling_ptr.rs:19 :24
42
42
|
43
43
LL | foo(4 as *const _, 8 as *mut _);
44
44
| ^^^^^^^^^^^ help: use: `std::ptr::dangling_mut()`
45
45
46
46
error: manual creation of a dangling pointer
47
- --> tests/ui/manual_dangling_ptr.rs:32 :9
47
+ --> tests/ui/manual_dangling_ptr.rs:39 :9
48
48
|
49
49
LL | foo(4 as *const _, 8 as *mut _);
50
50
| ^^^^^^^^^^^^^ help: use: `std::ptr::dangling()`
51
51
52
52
error: manual creation of a dangling pointer
53
- --> tests/ui/manual_dangling_ptr.rs:32 :24
53
+ --> tests/ui/manual_dangling_ptr.rs:39 :24
54
54
|
55
55
LL | foo(4 as *const _, 8 as *mut _);
56
56
| ^^^^^^^^^^^ help: use: `std::ptr::dangling_mut()`
0 commit comments