2022-10-01 16:59:17 +00:00
|
|
|
error: casting the result of `as_ptr` to *mut u8
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/as_ptr_cast_mut.rs:22:13
|
2022-10-01 16:59:17 +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`
|
|
|
|
|
|
|
|
error: casting the result of `as_ptr` to *mut i8
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/as_ptr_cast_mut.rs:23:22
|
2022-10-01 16:59:17 +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
|
|
|
|
|