vec in-place-drop: avoid creating an intermediate slice#150643
Merged
bors merged 1 commit intorust-lang:mainfrom Jan 4, 2026
Merged
vec in-place-drop: avoid creating an intermediate slice#150643bors merged 1 commit intorust-lang:mainfrom
bors merged 1 commit intorust-lang:mainfrom
Conversation
Collaborator
This comment has been minimized.
This comment has been minimized.
90cfcdf to
47798e2
Compare
tgross35
approved these changes
Jan 4, 2026
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
that referenced
this pull request
Jan 4, 2026
Rollup of 7 pull requests Successful merges: - #150201 (compiletest: Support revisions in debuginfo (read: debugger) tests) - #150642 (mutex.rs: remove needless-maybe-unsized bounds) - #150643 (vec in-place-drop: avoid creating an intermediate slice) - #150650 (Forbid generic parameters in types of #[type_const] items) - #150658 (Clarify panic conditions in `Iterator::last`) - #150659 (Add missing translator resources for interface parse_cfg and parse_check_cfg) - #150666 (Fix ambig-unambig-ty-and-consts link) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Jan 4, 2026
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)]` ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoids clippy warning: