mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
17 lines
649 B
Text
17 lines
649 B
Text
error: casting the result of `as_ptr` to *mut u8
|
|
--> $DIR/as_ptr_cast_mut.rs:22:13
|
|
|
|
|
LL | let _ = string.as_ptr() as *mut u8;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `string.as_mut_ptr()`
|
|
|
|
|
= note: `-D clippy::as-ptr-cast-mut` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::as_ptr_cast_mut)]`
|
|
|
|
error: casting the result of `as_ptr` to *mut i8
|
|
--> $DIR/as_ptr_cast_mut.rs:25:22
|
|
|
|
|
LL | let _: *mut i8 = string.as_ptr() as *mut _;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `string.as_mut_ptr()`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|