Skip to content

elaborate_drop: Avoid as_mut.unwrap dance, empty vectors are cheap. - #157162

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
cjgillot:as_mut_unwrap
May 31, 2026
Merged

elaborate_drop: Avoid as_mut.unwrap dance, empty vectors are cheap.#157162
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
cjgillot:as_mut_unwrap

Conversation

@cjgillot

Copy link
Copy Markdown
Contributor

Nit I found while working on #156649

@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 30, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

r? @mu001999

rustbot has assigned @mu001999.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, mir, mir-opt
  • compiler, mir, mir-opt expanded to 73 candidates
  • Random selection from 17 candidates

@mejrsmejrs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-borsBot commented May 30, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 48a7303 has been approved by mejrs

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 May 30, 2026
rust-borsBot pushed a commit that referenced this pull request May 30, 2026
…uwer
Rollup of 8 pull requests
Successful merges:
- #157006 (net tests: let the OS pick the port numbers)
- #157126 (Avoid redundant note when a #[derive] is already suggested)
- #151690 (std: Refactor `env::var` function)
- #155826 (std::process: uefi: avoid panicking in Stdio From impls.)
- #156109 (Migrate libraries from ptr::slice_from_raw_parts to .cast_slice)
- #156642 (`offload_kernel` macro expansion)
- #156823 (Add regression test)
- #157162 (elaborate_drop: Avoid as_mut.unwrap dance, empty vectors are cheap.)
Failed merges:
- #157173 (rustc-dev-guide subtree update)
@rust-bors
rust-borsBot merged commit d662f5a into rust-lang:mainMay 31, 2026
12 checks passed
@rustbotrustbot added this to the 1.98.0 milestone May 31, 2026
@cjgillot
cjgillot deleted the as_mut_unwrap branch May 31, 2026 06:28
pullBot pushed a commit to xtqqczze/rust-lang-rustc-dev-guide that referenced this pull request Jun 4, 2026
…uwer
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#157006 (net tests: let the OS pick the port numbers)
- rust-lang/rust#157126 (Avoid redundant note when a #[derive] is already suggested)
- rust-lang/rust#151690 (std: Refactor `env::var` function)
- rust-lang/rust#155826 (std::process: uefi: avoid panicking in Stdio From impls.)
- rust-lang/rust#156109 (Migrate libraries from ptr::slice_from_raw_parts to .cast_slice)
- rust-lang/rust#156642 (`offload_kernel` macro expansion)
- rust-lang/rust#156823 (Add regression test)
- rust-lang/rust#157162 (elaborate_drop: Avoid as_mut.unwrap dance, empty vectors are cheap.)
Failed merges:
- rust-lang/rust#157173 (rustc-dev-guide subtree update)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@cjgillot@rustbot@mejrs@mu001999