Skip to content

vec::Drain::fill: avoid reference to uninitialized memory#154138

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
RalfJung:vec-slice-uninit
Mar 21, 2026
Merged

vec::Drain::fill: avoid reference to uninitialized memory#154138
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
RalfJung:vec-slice-uninit

Conversation

@RalfJung
Copy link
Member

range_slice points to memory that is not initialized (e.g. it might be dropped Box/String). Let's avoid that and instead use an index-based loop.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 20, 2026
@joboet
Copy link
Member

joboet commented Mar 20, 2026

Weird that this didn't get assigned...
r? joboet
@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 20, 2026

📌 Commit 43eb70a has been approved by joboet

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 20, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 20, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #153828 (Guard patterns: lowering to THIR)
 - #154015 (refactor - moving `check_stability` check to `parse_stability`)
 - #154119 (llvm: Update `reliable_f128` configuration for LLVM22 on Sparc)
 - #154138 (vec::Drain::fill: avoid reference to uninitialized memory)
 - #154143 (test copy_specializes_from_vecdeque: reduce iteration count for Miri)
@rust-bors rust-bors bot merged commit c745d58 into rust-lang:main Mar 21, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 21, 2026
@RalfJung RalfJung deleted the vec-slice-uninit branch March 21, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants