]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/cast_raw_slice_pointer_cast.stderr
Rollup merge of #103178 - ferrocene:pa-coverage-reports-tests, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / tests / ui / cast_raw_slice_pointer_cast.stderr
1 error: casting the result of `from_raw_parts` to *const [u8]
2   --> $DIR/cast_raw_slice_pointer_cast.rs:9:35
3    |
4 LL |     let _: *const [u8] = unsafe { std::slice::from_raw_parts(ptr, 1) as *const [u8] };
5    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `core::ptr::slice_from_raw_parts(ptr, 1)`
6    |
7    = note: `-D clippy::cast-slice-from-raw-parts` implied by `-D warnings`
8
9 error: casting the result of `from_raw_parts_mut` to *mut [u8]
10   --> $DIR/cast_raw_slice_pointer_cast.rs:10:35
11    |
12 LL |     let _: *const [u8] = unsafe { std::slice::from_raw_parts_mut(mptr, 1) as *mut [u8] };
13    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `core::ptr::slice_from_raw_parts_mut(mptr, 1)`
14
15 error: casting the result of `from_raw_parts` to *const [u8]
16   --> $DIR/cast_raw_slice_pointer_cast.rs:11:26
17    |
18 LL |     let _: *const [u8] = unsafe { std::slice::from_raw_parts(ptr, 1) } as *const [u8];
19    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `core::ptr::slice_from_raw_parts(ptr, 1)`
20
21 error: casting the result of `from_raw_parts` to *const [u8]
22   --> $DIR/cast_raw_slice_pointer_cast.rs:14:30
23    |
24 LL |         let _: *const [u8] = unsafe { slice::from_raw_parts(ptr, 1) } as *const [u8];
25    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `core::ptr::slice_from_raw_parts(ptr, 1)`
26
27 error: casting the result of `from_raw_parts` to *const [u8]
28   --> $DIR/cast_raw_slice_pointer_cast.rs:16:30
29    |
30 LL |         let _: *const [u8] = unsafe { one::from_raw_parts(ptr, 1) } as *const [u8];
31    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `core::ptr::slice_from_raw_parts(ptr, 1)`
32
33 error: casting the result of `from_raw_parts` to *const [u8]
34   --> $DIR/cast_raw_slice_pointer_cast.rs:20:30
35    |
36 LL |         let _: *const [u8] = unsafe { slice::from_raw_parts(ptr, 1) } as *const [u8];
37    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `core::ptr::slice_from_raw_parts(ptr, 1)`
38
39 error: casting the result of `from_raw_parts` to *const [u8]
40   --> $DIR/cast_raw_slice_pointer_cast.rs:22:30
41    |
42 LL |         let _: *const [u8] = unsafe { one::from_raw_parts(ptr, 1) } as *const [u8];
43    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `core::ptr::slice_from_raw_parts(ptr, 1)`
44
45 error: aborting due to 7 previous errors
46