Commit 5750ac5
authored
Unrolled build for #150643
Rollup merge of #150643 - hkBst:cast-slice-from-raw-parts-1, r=tgross35
vec in-place-drop: avoid creating an intermediate slice
Avoids clippy warning:
```text
warning: implicitly casting the result of `from_raw_parts_mut` to `*mut [T]`
--> library/alloc/src/vec/in_place_drop.rs:25:32
|
25 | ptr::drop_in_place(slice::from_raw_parts_mut(self.inner, self.len()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace_with: `core::ptr::slice_from_raw_parts_mut(self.inner, self.len())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_from_raw_parts
= note: `-W clippy::cast-slice-from-raw-parts` implied by `-W clippy::suspicious`
= help: to override `-W clippy::suspicious` add `#[allow(clippy::cast_slice_from_raw_parts)]`
```1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
0 commit comments