mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
19 lines
741 B
Text
19 lines
741 B
Text
error: `as` casting between raw pointers without changing its mutability
|
|
--> tests/ui/crashes/ice-12616.rs:6:5
|
|
|
|
|
LL | s() as *const ();
|
|
| ^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `s().cast::<()>()`
|
|
|
|
|
= note: `-D clippy::ptr-as-ptr` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::ptr_as_ptr)]`
|
|
|
|
error: `as` casting between raw pointers without changing its mutability
|
|
--> tests/ui/crashes/ice-12616.rs:6:5
|
|
|
|
|
LL | s() as *const ();
|
|
| ^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `s().cast::<()>()`
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|