2022-10-23 13:18:45 +00:00
|
|
|
error: casting the result of `as_ptr` to *mut u8
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/as_ptr_cast_mut.rs:22:13
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
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`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::as_ptr_cast_mut)]`
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
error: casting the result of `as_ptr` to *mut i8
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/as_ptr_cast_mut.rs:25:22
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | let _: *mut i8 = string.as_ptr() as *mut _;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `string.as_mut_ptr()`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|