|
1 | 1 | error: `as` casting between raw pointers without changing its mutability
|
2 |
| - --> $DIR/ptr_as_ptr.rs:9:13 |
| 2 | + --> $DIR/ptr_as_ptr.rs:10:13 |
3 | 3 | |
|
4 | 4 | LL | let _ = ptr as *const i32;
|
5 | 5 | | ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
|
6 | 6 | |
|
7 | 7 | = note: `-D clippy::ptr-as-ptr` implied by `-D warnings`
|
8 | 8 |
|
9 | 9 | error: `as` casting between raw pointers without changing its mutability
|
10 |
| - --> $DIR/ptr_as_ptr.rs:10:13 |
| 10 | + --> $DIR/ptr_as_ptr.rs:11:13 |
11 | 11 | |
|
12 | 12 | LL | let _ = mut_ptr as *mut i32;
|
13 | 13 | | ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`
|
14 | 14 |
|
15 | 15 | error: `as` casting between raw pointers without changing its mutability
|
16 |
| - --> $DIR/ptr_as_ptr.rs:15:17 |
| 16 | + --> $DIR/ptr_as_ptr.rs:16:17 |
17 | 17 | |
|
18 | 18 | LL | let _ = *ptr_ptr as *const i32;
|
19 | 19 | | ^^^^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `(*ptr_ptr).cast::<i32>()`
|
20 | 20 |
|
21 | 21 | error: `as` casting between raw pointers without changing its mutability
|
22 |
| - --> $DIR/ptr_as_ptr.rs:28:25 |
| 22 | + --> $DIR/ptr_as_ptr.rs:29:25 |
23 | 23 | |
|
24 | 24 | LL | let _: *const i32 = ptr as *const _;
|
25 | 25 | | ^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast()`
|
26 | 26 |
|
27 | 27 | error: `as` casting between raw pointers without changing its mutability
|
28 |
| - --> $DIR/ptr_as_ptr.rs:29:23 |
| 28 | + --> $DIR/ptr_as_ptr.rs:30:23 |
29 | 29 | |
|
30 | 30 | LL | let _: *mut i32 = mut_ptr as _;
|
31 | 31 | | ^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast()`
|
32 | 32 |
|
33 |
| -error: aborting due to 5 previous errors |
| 33 | +error: `as` casting between raw pointers without changing its mutability |
| 34 | + --> $DIR/ptr_as_ptr.rs:48:13 |
| 35 | + | |
| 36 | +LL | let _ = ptr as *const i32; |
| 37 | + | ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()` |
| 38 | + |
| 39 | +error: `as` casting between raw pointers without changing its mutability |
| 40 | + --> $DIR/ptr_as_ptr.rs:49:13 |
| 41 | + | |
| 42 | +LL | let _ = mut_ptr as *mut i32; |
| 43 | + | ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()` |
| 44 | + |
| 45 | +error: aborting due to 7 previous errors |
34 | 46 |
|
0 commit comments