2021-01-15 03:56:44 -06:00
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2022-12-01 11:29:38 -06:00
|
|
|
--> $DIR/ptr_as_ptr.rs:18:13
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | let _ = ptr as *const i32;
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::ptr-as-ptr` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2022-12-01 11:29:38 -06:00
|
|
|
--> $DIR/ptr_as_ptr.rs:19:13
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | let _ = mut_ptr as *mut i32;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`
|
|
|
|
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2022-12-01 11:29:38 -06:00
|
|
|
--> $DIR/ptr_as_ptr.rs:24:17
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | let _ = *ptr_ptr as *const i32;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `(*ptr_ptr).cast::<i32>()`
|
|
|
|
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2022-12-01 11:29:38 -06:00
|
|
|
--> $DIR/ptr_as_ptr.rs:37:25
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | let _: *const i32 = ptr as *const _;
|
|
|
|
| ^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast()`
|
|
|
|
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2022-12-01 11:29:38 -06:00
|
|
|
--> $DIR/ptr_as_ptr.rs:38:23
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | let _: *mut i32 = mut_ptr as _;
|
|
|
|
| ^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast()`
|
|
|
|
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2022-12-01 11:29:38 -06:00
|
|
|
--> $DIR/ptr_as_ptr.rs:10:9
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | $ptr as *const i32
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `$ptr.cast::<i32>()`
|
|
|
|
...
|
|
|
|
LL | let _ = cast_it!(ptr);
|
|
|
|
| ------------- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in the macro `cast_it` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2022-12-01 11:29:38 -06:00
|
|
|
--> $DIR/ptr_as_ptr.rs:62:13
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | let _ = ptr as *const i32;
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
|
|
|
|
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2022-12-01 11:29:38 -06:00
|
|
|
--> $DIR/ptr_as_ptr.rs:63:13
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | let _ = mut_ptr as *mut i32;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
error: aborting due to 8 previous errors
|
2021-01-15 03:56:44 -06:00
|
|
|
|