2021-01-15 03:56:44 -06:00
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2023-08-11 07:05:13 -05:00
|
|
|
--> $DIR/ptr_as_ptr.rs:19:33
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
2023-08-11 07:05:13 -05:00
|
|
|
LL | *unsafe { Box::from_raw(Box::into_raw(Box::new(o)) as *mut super::issue_11278_a::T<String>) }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `Box::into_raw(Box::new(o)).cast::<super::issue_11278_a::T<String>>()`
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::ptr-as-ptr` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2023-08-11 07:05:13 -05:00
|
|
|
--> $DIR/ptr_as_ptr.rs:28:13
|
|
|
|
|
|
|
|
|
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
|
|
|
|
--> $DIR/ptr_as_ptr.rs:29: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
|
2023-08-11 07:05:13 -05:00
|
|
|
--> $DIR/ptr_as_ptr.rs:34: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
|
2023-08-11 07:05:13 -05:00
|
|
|
--> $DIR/ptr_as_ptr.rs:47: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
|
2023-08-11 07:05:13 -05:00
|
|
|
--> $DIR/ptr_as_ptr.rs:48: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
|
2023-08-11 07:05:13 -05:00
|
|
|
--> $DIR/ptr_as_ptr.rs:51:21
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
2023-03-24 08:04:35 -05:00
|
|
|
LL | let _ = inline!($ptr as *const i32);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `$ptr.cast::<i32>()`
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
2023-03-24 08:04:35 -05:00
|
|
|
= note: this error originates in the macro `__inline_mac_fn_main` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
2023-08-11 07:05:13 -05:00
|
|
|
--> $DIR/ptr_as_ptr.rs:72: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
|
2023-08-11 07:05:13 -05:00
|
|
|
--> $DIR/ptr_as_ptr.rs:73: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>()`
|
|
|
|
|
2023-08-11 07:05:13 -05:00
|
|
|
error: aborting due to 9 previous errors
|
2021-01-15 03:56:44 -06:00
|
|
|
|