|
1 | 1 | error: `as` casting between raw pointers without changing its mutability
|
2 |
| - --> $DIR/ptr_as_ptr.rs:10:13 |
| 2 | + --> $DIR/ptr_as_ptr.rs:19: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:11:13 |
| 10 | + --> $DIR/ptr_as_ptr.rs:20: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:16:17 |
| 16 | + --> $DIR/ptr_as_ptr.rs:25: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:29:25 |
| 22 | + --> $DIR/ptr_as_ptr.rs:38: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:30:23 |
| 28 | + --> $DIR/ptr_as_ptr.rs:39: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 | 33 | error: `as` casting between raw pointers without changing its mutability
|
34 |
| - --> $DIR/ptr_as_ptr.rs:48:13 |
| 34 | + --> $DIR/ptr_as_ptr.rs:11:9 |
| 35 | + | |
| 36 | +LL | $ptr as *const i32 |
| 37 | + | ^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `$ptr.cast::<i32>()` |
| 38 | +... |
| 39 | +LL | let _ = cast_it!(ptr); |
| 40 | + | ------------- in this macro invocation |
| 41 | + | |
| 42 | + = note: this error originates in the macro `cast_it` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 43 | + |
| 44 | +error: `as` casting between raw pointers without changing its mutability |
| 45 | + --> $DIR/ptr_as_ptr.rs:63:13 |
35 | 46 | |
|
36 | 47 | LL | let _ = ptr as *const i32;
|
37 | 48 | | ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
|
38 | 49 |
|
39 | 50 | error: `as` casting between raw pointers without changing its mutability
|
40 |
| - --> $DIR/ptr_as_ptr.rs:49:13 |
| 51 | + --> $DIR/ptr_as_ptr.rs:64:13 |
41 | 52 | |
|
42 | 53 | LL | let _ = mut_ptr as *mut i32;
|
43 | 54 | | ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`
|
44 | 55 |
|
45 |
| -error: aborting due to 7 previous errors |
| 56 | +error: aborting due to 8 previous errors |
46 | 57 |
|
0 commit comments